You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Thom Park <tp...@borland.com> on 2001/06/19 17:59:44 UTC
header handling in WARP
Hello everyone,
I have a question on how the Warp handler handles headers
coming back from a request.
In pr_warp.c, warp_handler,the following is written:
/* Check if we got an HDR packet (header) */
if (i->type==TYP_REQUEST_HDR) {
char *nam=p_rstring(i);
char *val=p_rstring(i);
wa_debug(WA_MARK,"Header \"%s\": \"%s\"",nam,val);
if (strcasecmp("Connection",nam)!=0) {
wa_rsetheader(r,nam,val);
}
if (strcasecmp("Content-Type",nam)==0) {
wa_rsetctype(r,val);
}
}
I notice that the headers for Connection and Content-Type are set in the
request's structure. However I couldn't see how any other headers will
get sent back to the client.
I'm sure I'm missing something!
Can someone (perhap Pier?) enlighten me as I'm getting a wee bit fed up with
my own density on this one ;-)
thanks,
Thom
Re: header handling in WARP
Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Thom Park at tpark@borland.com wrote:
> Hello everyone,
>
> I have a question on how the Warp handler handles headers
> coming back from a request.
>
> In pr_warp.c, warp_handler,the following is written:
>
> /* Check if we got an HDR packet (header) */
> if (i->type==TYP_REQUEST_HDR) {
> char *nam=p_rstring(i);
> char *val=p_rstring(i);
> wa_debug(WA_MARK,"Header \"%s\": \"%s\"",nam,val);
> if (strcasecmp("Connection",nam)!=0) {
> wa_rsetheader(r,nam,val);
> }
> if (strcasecmp("Content-Type",nam)==0) {
> wa_rsetctype(r,val);
> }
> }
>
> I notice that the headers for Connection and Content-Type are set in the
> request's structure. However I couldn't see how any other headers will
> get sent back to the client.
>
> I'm sure I'm missing something!
Yes, you're missing the point that I'm the biggest idiot on this planet :)
It's a week I'm trying to find it... :)
Pier