Re: Sending headers to server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Great tip, Karim!

On 02/08/13 15:29, Karim Geiger wrote:

Try getting the complete header by using curl -v http://url.com and
paste it here.

What is your output?


Here's my output:

$ curl -v http://localhost/header-test.php
* About to connect() to localhost port 80 (#0)
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 80 (#0)
> GET /header-test.php HTTP/1.1
> User-Agent: curl/7.29.0
> Host: localhost
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Fri, 02 Aug 2013 14:32:47 GMT
< Server: Apache/2.2.22 (Ubuntu)
< X-Powered-By: PHP/5.4.9-4ubuntu2.2
< Status: 500 Internal Server Error
< Vary: Accept-Encoding
< Content-Length: 0
< Content-Type: text/html
<
* Connection #0 to host localhost left intact

Using the following test script:

<?php

header('Status: 500 Internal Server Error');
header('HTTP/1.1 500 Internal Server Error', true, 500);

?>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux