How to override the HTTP Date header?

Ask a Question related to ASP, Design and Development.

  1. #1

    Default Re: How to override the HTTP Date header?

    If your intent is to somehow transfer the file such that the resultant
    file's datestamp is the same as the original, I'd like to ask you how the
    client that receives the streamed file is going to do that.

    --
    //David
    This posting is provided "AS IS" with no warranties, and confers no rights.
    //
    "Craig Humphrey" <Craig.Humphrey@nospam.chapmantripp.com> wrote in message
    news:06e301c34749$cf20e4d0$a101280a@phx.gbl...
    Hi,

    I'm trying to override the HTTP Date header the IIS (in
    this case IIS4) outputs. If I do a Response.Clear, it
    clears everything except the following:

    HTTP/1.1 200 OK
    Server: Microsoft-IIS/4.0
    Date: Fri, 11 Jul 2003 01:05:57 GMT

    I want to replace the Date header (duplicating seems to get
    the second date ignored). The reason being that I'm
    streaming a file from an ASP page and the Date field is
    always populated with the current date/time, rather than
    the date/time of the file I'm streaming.

    I'm populating the content-disposition header, but the
    dates in that seem to be ignored completely.

    Any ideas?

    Soon'ish
    Craig


    David Wang [Msft] Guest

  2. Similar Questions and Discussions

    1. Setting HTTP Header Attributes
      Hello, I am writing an application that makes a number of web service calls to a variety of sources and aggregates the data back on a web page. ...
    2. SoapAction in HTTP Header
      Hi, I just dumped the whole HTTP message when I called a web service method from my client application, I noticed that the SoapAction field is...
    3. how can i get the http header exactly as sent by UA ?
      .... no $_SERVER, $_COOKIE or $_POST stuff, but the string just "as is". please i need to know it. Thanks -- "It's not right. It's not even...
    4. HTTP Header - Weird!
      Hi. I have two sites on my computer. If I display the header information from site 1, it displays PATH_TRANSLATED as below. ...
    5. HTTP header errors
      Has anyone experienced random incomplete HTTP header errors? It seems to happen randomly, say 1 in 100 page loads but that is just the ones I see....
  3. #2

    Default Re: How to override the HTTP Date header?

    The Date header is ignored completely, it's there only to state the server's
    current time. You should be setting Modified header to reflect the content's
    last modification time.

    Jerry

    "Craig Humphrey" <Craig.Humphrey@nospam.chapmantripp.com> wrote in message
    news:06e301c34749$cf20e4d0$a101280a@phx.gbl...
    > Hi,
    >
    > I'm trying to override the HTTP Date header the IIS (in
    > this case IIS4) outputs. If I do a Response.Clear, it
    > clears everything except the following:
    >
    > HTTP/1.1 200 OK
    > Server: Microsoft-IIS/4.0
    > Date: Fri, 11 Jul 2003 01:05:57 GMT
    >
    > I want to replace the Date header (duplicating seems to get
    > the second date ignored). The reason being that I'm
    > streaming a file from an ASP page and the Date field is
    > always populated with the current date/time, rather than
    > the date/time of the file I'm streaming.
    >
    > I'm populating the content-disposition header, but the
    > dates in that seem to be ignored completely.
    >
    > Any ideas?
    >
    > Soon'ish
    > Craig
    >

    Jerry III Guest

  4. #3

    Default Re: How to override the HTTP Date header?

    I have a custom web application that required that Server Date/Time be manipulated. Never did find a way to override the Date header that the server sent, but it is possible to slip in an additional date header before the one the server inserts. It's not clean, must be done for each page and relies on whatever is on the other end respecting the first Date header, but it does work - at least it solved my problem.

    <%

    Response.Status= "200 OK" & vbCrLf & "Date: " & [Your Custom Time/Date Here]

    %>

    Headers received by client will resemble this:
    HTTP/1.1 200 OK
    Date: Mon, 28 Feb 2011 19:20:59 GMT
    Server: Microsoft-IIS/5.0
    Date: Fri, 04 Mar 2011 16:20:59 GMT
    X-Powered-By: ASP.NET
    Content-Length: 95
    Content-Type: text/html
    Cache-control: private
    Unregistered Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139