+ Reply to Thread
Results 1 to 3 of 3

Thread: edit HTTP Headers sent by server - How To

  1. #1
    roywoodall is offline New Bee
    Join Date
    Aug 2007
    Posts
    18
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default edit HTTP Headers sent by server - How To

    How do I edit HTTP Headers sent by server?

    thanks

  2. #2
    JasonD Guest

    Default

    Can you be more specific?

    Headers are sent prior to a page being sent. The settings on your server and contents of the data file being sent, or status of the file will determine what the header says.

    You can not normally construct a header, unless you program your own server program from scratch. You can use PHP to append data, and set data, for PHP files only. Unless all files are processed by PHP, but that could be taxing on the server. This is how I construct animated GIF's on the fly, like a captcha. (The header would still have to send valid information, or it will fail to function with the device it is talking to.)

    There is not much data in a header.

    File size:
    File compression:
    File name:
    Host:
    Expire:
    Type:
    Error:
    etc...

    http://en.wikipedia.org/wiki/List_of_HTTP_headers

    However, for specific things that are not just "Served", you can use PHP to construct the return data, which includes headers. (This is usually done when sending mails or sending nonstandard items. EG, if you created a program that has a special file, but uses HTTP as the transmission, that file would use your custom header. All other standard headers are controlled by the server, via the ACCEPT listings. bmp, gif, htm, php, js, png, gzip, zip, etc...)

    This is why I asked if you can elaborate.

    What is this for?
    What type of file?
    What type of info do you want to change/edit/add/remove?

    I will say that asking a question like this will be viewed with a little caution and suspicion. That is because modification of server sent headers is something that resembles hacking. (Forged headers are not allowed.) However, that is not the only purpose of editing headers. Often editing is to fix things, and add functionality. So that is why I asked for more elaboration.
    Last edited by JasonD; 09-15-2009 at 03:30 AM.

  3. #3
    genrock is offline New Bee
    Join Date
    Apr 2010
    Posts
    11
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by JasonD View Post
    Can you be more specific?

    Headers are sent prior to a page being sent. The settings on your server and contents of the data file being sent, or status of the file will determine what the header says.

    You can not normally construct a header, unless you program your own server program from scratch. You can use PHP to append data, and set data, for PHP files only. Unless all files are processed by PHP, but that could be taxing on the server. This is how I construct animated GIF's on the fly, like a captcha. (The header would still have to send valid information, or it will fail to function with the device it is talking to.)

    There is not much data in a header.

    File size:
    File compression:
    File name:
    Host:
    Expire:
    Type:
    Error:
    etc...

    http://en.wikipedia.org/wiki/List_of_HTTP_headers

    However, for specific things that are not just "Served", you can use PHP to construct the return data, which includes headers. (This is usually done when sending mails or sending nonstandard items. EG, if you created a program that has a special file, but uses HTTP as the transmission, that file would use your custom header. All other standard headers are controlled by the server, via the ACCEPT listings. bmp, gif, htm, php, js, png, gzip, zip, etc...)

    This is why I asked if you can elaborate.

    What is this for?
    What type of file?
    What type of info do you want to change/edit/add/remove?

    I will say that asking a question like this will be viewed with a little caution and suspicion. That is because modification of server sent headers is something that resembles hacking. (Forged headers are not allowed.) However, that is not the only purpose of editing headers. Often editing is to fix things, and add functionality. So that is why I asked for more elaboration.
    Yes, it definitely resembles hacking so be prepared for people not wanting to give you the exact details on how to do it.

+ Reply to Thread

Posting Permissions

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