Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question about HTTP Headers

    Hey there, I have a question about HTTP response headers... Here is an example response header from PHP.net:

    Code:
    HTTP/1.1 200 OK
    Date: Fri, 11 Nov 2005 23:35:55 GMT
    Server: Apache/1.3.26 (Unix) mod_gzip/1.3.26.1a PHP/4.3.3-dev
    X-Powered-By: PHP/4.3.3-dev
    Last-Modified: Fri, 11 Nov 2005 23:25:48 GMT
    Content-language: en
    Set-Cookie: COUNTRY=GBR%2C86.133.245.211; expires=Fri, 18-Nov-05 23:35:55 GMT; path=/; domain=.php.net
    Connection: close
    Transfer-Encoding: chunked
    Content-Type: text/html;charset=ISO-8859-1
    
    2175
    I'm just wondering what the bit in red is, before the HTML document starts, anyone have any ideas?

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,470
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts
    It's short for "Two-Thousand One-Hundred and Seventy Five" ...

    ... just kidding ...

    I don't know.

    It looks like something the server or whatever outputted along with the text.
    You would almost have to look into the server source code that generated it.

    maybe a byte count?

  • #3
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No, it can't be... If it had a byte count it would be set in "Content-Length: 1234", besides the page was easily more, and on one of my own pages I got something like "18b".

  • #4
    Regular Coder
    Join Date
    Jul 2004
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This example:
    http://curl.haxx.se/libcurl/php/examples/callbacks.html

    outputs headers in a different way.

    What's the red thing? ya!
    `~@#\^%&*/\.<.\/-|+|_!:;..=?>
    Anshul | SriSolution.com | FB

  • #5
    Regular Coder
    Join Date
    Oct 2004
    Posts
    360
    Thanks
    0
    Thanked 17 Times in 17 Posts
    It might be because of HTTP/1.1, the bottom post on fsockopen on php.net says
    Quote Originally Posted by http://uk2.php.net/manual/en/function.fsockopen.php#18037
    This is a "gotcha" that "got me" and discusses the careful use of HTTP/1.1 over HTTP/1.0

    I had a script that suffered dreadful performance and return Hex values amongst the correct data. This was eventually traced to my inclusion of HTTP/1.1

    [cut]

    By sending a HTTP/1.1 request it declares that it is willing to 'speak' HTTP/1.1, of course, but there are some aspects of HTTP/1.1 that make it necessary to handle the socket differently from HTTP/1.0.

    In the RFC 2616, Section 3.6 defines:

    [...]
    All HTTP/1.1 applications MUST be able to receive and decode the "chunked" transfer-coding,
    [...]
    EDIT: (it has something to do with chunked data)
    Last edited by schleppel; 11-12-2005 at 03:16 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •