Re: Making a HttpHeader persist.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tim (Tim_at_discussions.microsoft.com)
Date: 09/01/04


Date: Wed, 1 Sep 2004 12:41:02 -0700

Hey Kevin,
  Thanks for explaining that.

Tim

"Kevin Spencer" wrote:

> > I'd appreciate any advice on how to generate a Request Header for testing
> > purposes.
>
> That would be done by modifying the client browser configuration somehow.
> How, I'm not sure.
>
> --
> HTH,
> Kevin Spencer
> ..Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Tim" <Tim@discussions.microsoft.com> wrote in message
> news:FC769873-080E-42AA-8A76-1EDE80CDE8EA@microsoft.com...
> > Hello,
> > Thank you for the posts.
> > > Who is going to tell the browser to add it?
> > I did not realize this (I incorrectly thought that the Response header
> would
> > automatically "stick around" and be appended to the Request header). Thank
> > you for pointing that out.
> >
> > > if you can tell us what you're trying to achieve
> > I am making a sub-app whose security is managed by a system that sends
> > info through the http headers (I did not make this security system). For
> > example, every request might contain a header "AB_User" that I need to
> read.
> > For testing and development purposes I am trying to stub out that security
> > system by autogenerating my own matching header. Right now because our app
> > isn't under that security system yet, there are no headers, and I cannot
> test
> > it.
> >
> > I'd appreciate any advice on how to generate a Request Header for testing
> > purposes.
> >
> > Thanks again,
> > Tim
> >
> >
> > "Kevin Spencer" wrote:
> >
> > > A header is part of an HTTP message. When you add a header on the server
> > > side, you are adding it to the Response. Your new header is IN that
> Response
> > > message. What you get back from the client is a Request. Your new header
> is
> > > NOT part of the Request sent by the browser. Who is going to tell the
> > > browser to add it?
> > >
> > > Also note that you are reading from the Request Headers, and you
> inserted
> > > the value into the Response headers. Because of the nature of these
> headers,
> > > you can no more write to the Request headers than I can change your
> posted
> > > message. It is a Request. The browser is doing the Requesting. Not the
> > > server. IOW, unlike Cookies, the Response and Request headers are 2
> entirely
> > > different Collections.
> > >
> > > Finally, if you can tell us what you're trying to achieve, in terms of
> > > business requirements, I think we can suggest a workable alternative.
> > >
> > > --
> > > HTH,
> > > Kevin Spencer
> > > ..Net Developer
> > > Microsoft MVP
> > > Big things are made up
> > > of lots of little things.
> > >
> > > "Tim" <Tim@discussions.microsoft.com> wrote in message
> > > news:5A39D56B-D14E-4BEB-9C4D-07761F358805@microsoft.com...
> > > > Hello,
> > > > I add a header to the response in the page_load, like so:
> > > >
> > > > Me.Response.AppendHeader("NewHeader", "NewValue")
> > > >
> > > > However when I try to get that header on any subsequent event (like
> > > clicking
> > > > a button), it doesn't appear. For example the following returns an
> empty
> > > > string:
> > > > Me.Request.Headers.Get("NewHeader")
> > > >
> > > > Does anyone know why this is? How can I add a header, and then get it?
> > > >
> > > > Thanks for any help,
> > > > Tim
> > >
> > >
> > >
>
>
>



Relevant Pages

  • Re: eCryptfs Design Document
    ... not-so-trivial changes to eCryptfs that we have planned for the 0.2 ... header that indicates the page size, so that at least eCryptfs will ... That's because 4096 is, for practical purposes, the minimum Linux ... My main concern with FUSE has to do with shared memory mappings. ...
    (Linux-Kernel)
  • Re: parsing csv files class
    ... Tim, Thank you for your suggestions that you made. ... I was actually deleting the header outside of the class. ... to import the "string" module. ... for row in reader: ...
    (comp.lang.python)
  • Re: 744 question
    ... you can transfer the files to computer and the burn dvd for fostex with out ... sd header and it would be good for all purposes ... Oleg Kaizerman Hollyland ...
    (rec.arts.movies.production.sound)
  • Re: Changing TTL of incoming packets?
    ... Anycase you do can play with IP header for that, ... Arkady ... >> You're forwarding them on using windows api, ...
    (microsoft.public.win32.programmer.networks)
  • Re: beginners question about layers / order of precedence.
    ... Op 13-1-2012 19:00, Tim W schreef: ... 'container' it has another background colour and in that div I have ... You don't have to give the container a z-index to show it. ... Exactly the same about a header within the container. ...
    (alt.html)