IIS 6.0 and Kernel Cache Problem

This is a discussion on IIS 6.0 and Kernel Cache Problem within the Inetserver forums in Microsoft Tools category; We enabled kernel caching in IIS for requests. It works fine, but if a request contains If-None-Match in the header, we get 400 (Bad Request). If the request does not contain if-none-match in the header, the requests are successful. How do we make it so that requests containing if-none-match in the header are successful?...

Go Back   Application Development Forum > Microsoft Tools > Inetserver

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 10-15-2008, 05:04 PM
Joseph
Guest
 
Default IIS 6.0 and Kernel Cache Problem

We enabled kernel caching in IIS for requests. It works fine, but if a
request contains If-None-Match in the header, we get 400 (Bad Request). If
the request does not contain if-none-match in the header, the requests are
successful. How do we make it so that requests containing if-none-match in
the header are successful?

Reply With Quote
  #2  
Old 10-16-2008, 03:32 AM
Anthony Jones
Guest
 
Default Re: IIS 6.0 and Kernel Cache Problem

"Joseph" <Joseph@discussions.microsoft.com> wrote in message
news:4F72A2F3-3105-4A8C-8313-C3B5FE5B66A4@microsoft.com...
> We enabled kernel caching in IIS for requests. It works fine, but if a
> request contains If-None-Match in the header, we get 400 (Bad Request).
> If
> the request does not contain if-none-match in the header, the requests are
> successful. How do we make it so that requests containing if-none-match in
> the header are successful?
>


The appearance of If-None-Match header in HTTP requests is very common hence
your site would be seriously broken. Can you show use a set of
request/response headers for a sucessful and then a failed request collected
using a tool such as http://www.fiddlertool.com/fiddler/


--
Anthony Jones - MVP ASP/ASP.NET

Reply With Quote
  #3  
Old 10-16-2008, 03:16 PM
Joseph
Guest
 
Default Re: IIS 6.0 and Kernel Cache Problem

Anthony,

What happens is that the request, if not in the kernel cache, will work, as
seen below:

GET /-/runtime.js HTTP/1.1
If-Modified-Since: Wed, 15 Oct 2008 07:11:40 GMT
If-None-Match: EDC1128166C93AD264927C8427925
Host: [Host]

HTTP/1.1 304 Not Modified
Connection: close
Date: Thu, 16 Oct 2008 19:07:17 GMT
Server: Microsoft-IIS/6.0
Cache-Control: public
Expires: Thu, 16 Oct 2008 21:53:33 GMT
Last-Modified: Wed, 15 Oct 2008 07:11:40 GMT
ETag: EDC1128166C93AD264927C8427925

However, once it is in the kernel cache, the same request results in a Bad
Request, as shown below:


GET /-/runtime.js HTTP/1.1
If-Modified-Since: Wed, 15 Oct 2008 07:11:40 GMT
If-None-Match: EDC1128166C93AD264927C8427925
Host: [Host]

HTTP/1.1 400 Bad Request
Content-Type: text/html
Date: Thu, 16 Oct 2008 19:01:12 GMT
Connection: close
Content-Length: 20

<h1>Bad Request</h1>

Our developers do know that the problem is not ASP.Net related.

We're trying to make it so that the requests do not result in Bad Requests.

We're currently using Windows 2003 Standard with IIS 6.0.

Thanks.

"Anthony Jones" wrote:

> "Joseph" <Joseph@discussions.microsoft.com> wrote in message
> news:4F72A2F3-3105-4A8C-8313-C3B5FE5B66A4@microsoft.com...
> > We enabled kernel caching in IIS for requests. It works fine, but if a
> > request contains If-None-Match in the header, we get 400 (Bad Request).
> > If
> > the request does not contain if-none-match in the header, the requests are
> > successful. How do we make it so that requests containing if-none-match in
> > the header are successful?
> >

>
> The appearance of If-None-Match header in HTTP requests is very common hence
> your site would be seriously broken. Can you show use a set of
> request/response headers for a sucessful and then a failed request collected
> using a tool such as http://www.fiddlertool.com/fiddler/
>
>
> --
> Anthony Jones - MVP ASP/ASP.NET
>
>

Reply With Quote
  #4  
Old 10-17-2008, 05:18 AM
David Wang
Guest
 
Default Re: IIS 6.0 and Kernel Cache Problem

What you see is correct as specified by RFC2616 for HTTP/1.1.

The relevant section:

The result of a request having both an If-None-Match header field and
either an If-Match or an If-Unmodified-Since header fields is
undefined by this specification.

--> The kernel response cache returns 400 Bad Request. Perfectly fine
according to specification.

I suggest you just use If-Modified-Since. Any client that relies on
unspecified behavior of specifications is just asking to be broken.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//



On Oct 16, 12:16*pm, Joseph <Jos...@discussions.microsoft.com> wrote:
> Anthony,
>
> What happens is that the request, if not in the kernel cache, will work, as
> seen below:
>
> GET /-/runtime.js HTTP/1.1
> If-Modified-Since: Wed, 15 Oct 2008 07:11:40 GMT
> If-None-Match: EDC1128166C93AD264927C8427925
> Host: [Host]
>
> HTTP/1.1 304 Not Modified
> Connection: close
> Date: Thu, 16 Oct 2008 19:07:17 GMT
> Server: Microsoft-IIS/6.0
> Cache-Control: public
> Expires: Thu, 16 Oct 2008 21:53:33 GMT
> Last-Modified: Wed, 15 Oct 2008 07:11:40 GMT
> ETag: EDC1128166C93AD264927C8427925
>
> However, once it is in the kernel cache, the same request results in a Bad
> Request, as shown below:
>
> GET /-/runtime.js HTTP/1.1
> If-Modified-Since: Wed, 15 Oct 2008 07:11:40 GMT
> If-None-Match: EDC1128166C93AD264927C8427925
> Host: [Host]
>
> HTTP/1.1 400 Bad Request
> Content-Type: text/html
> Date: Thu, 16 Oct 2008 19:01:12 GMT
> Connection: close
> Content-Length: 20
>
> <h1>Bad Request</h1>
>
> Our developers do know that the problem is not ASP.Net related. *
>
> We're trying to make it so that the requests do not result in Bad Requests.
>
> We're currently using Windows 2003 Standard with IIS 6.0.
>
> Thanks.
>
>
>
> "Anthony Jones" wrote:
> > "Joseph" <Jos...@discussions.microsoft.com> wrote in message
> >news:4F72A2F3-3105-4A8C-8313-C3B5FE5B66A4@microsoft.com...
> > > We enabled kernel caching in IIS for requests. It works fine, but if a
> > > request contains If-None-Match in the header, we get 400 (Bad Request).
> > > If
> > > the request does not contain if-none-match in the header, the requests are
> > > successful. How do we make it so that requests containing if-none-match in
> > > the header are successful?

>
> > The appearance of If-None-Match header in HTTP requests is very common hence
> > your site would be seriously broken. *Can you show use a set of
> > request/response headers for a sucessful and then a failed request collected
> > using a tool such ashttp://www.fiddlertool.com/fiddler/

>
> > --
> > Anthony Jones - MVP ASP/ASP.NET- Hide quoted text -

>
> - Show quoted text -


Reply With Quote
  #5  
Old 10-17-2008, 05:35 AM
Anthony Jones
Guest
 
Default Re: IIS 6.0 and Kernel Cache Problem

"David Wang" <w3.4you@gmail.com> wrote in message
news:5d982ac9-c5bb-4a1b-8df8-d348e3077ef4@v16g2000prc.googlegroups.com...
What you see is correct as specified by RFC2616 for HTTP/1.1.

The relevant section:

The result of a request having both an If-None-Match header field and
either an If-Match or an If-Unmodified-Since header fields is
undefined by this specification.

--> The kernel response cache returns 400 Bad Request. Perfectly fine
according to specification.

I suggest you just use If-Modified-Since. Any client that relies on
unspecified behavior of specifications is just asking to be broken.

>>>>>


You have got to be kidding!!

The static content handler in IIS sends both ETag and Last-Modified headers
with its response.
IE on re-requestimg the resource will send both If-Modified-Since and
If-None-Match.
If HTTP.SYS decides thats a bad request then you're in deep do-do.


--
Anthony Jones - MVP ASP/ASP.NET

Reply With Quote
  #6  
Old 10-18-2008, 03:25 AM
David Wang
Guest
 
Default Re: IIS 6.0 and Kernel Cache Problem

On Oct 17, 2:35*am, "Anthony Jones" <AnthonyWJo...@yadayadayada.com>
wrote:
> "David Wang" <w3.4...@gmail.com> wrote in message
>
> news:5d982ac9-c5bb-4a1b-8df8-d348e3077ef4@v16g2000prc.googlegroups.com...
> What you see is correct as specified by RFC2616 for HTTP/1.1.
>
> The relevant section:
>
> The result of a request having both an If-None-Match header field and
> either an If-Match or an If-Unmodified-Since header fields is
> undefined by this specification.
>
> --> The kernel response cache returns 400 Bad Request. Perfectly fine
> according to specification.
>
> I suggest you just use If-Modified-Since. Any client that relies on
> unspecified behavior of specifications is just asking to be broken.
>
>
>
> You have got to be kidding!!
>
> The static content handler in IIS sends both *ETag and Last-Modified headers
> with its response.
> IE on re-requestimg the resource will send both If-Modified-Since and
> If-None-Match.
> If HTTP.SYS decides thats a bad request then you're in deep do-do.
>
> --
> Anthony Jones - MVP ASP/ASP.NET



Well, either change the spec, change the server, or change the
client...


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
Reply With Quote
  #7  
Old 10-18-2008, 12:56 PM
Anthony Jones
Guest
 
Default Re: IIS 6.0 and Kernel Cache Problem

"David Wang" <w3.4you@gmail.com> wrote in message
news:26c94d2d-2aa4-4701-a3c0-c777cb854c06@s1g2000prg.googlegroups.com...
On Oct 17, 2:35 am, "Anthony Jones" <AnthonyWJo...@yadayadayada.com>
wrote:
> "David Wang" <w3.4...@gmail.com> wrote in message
>
> news:5d982ac9-c5bb-4a1b-8df8-d348e3077ef4@v16g2000prc.googlegroups.com...
> What you see is correct as specified by RFC2616 for HTTP/1.1.
>
> The relevant section:
>
> The result of a request having both an If-None-Match header field and
> either an If-Match or an If-Unmodified-Since header fields is
> undefined by this specification.
>
> --> The kernel response cache returns 400 Bad Request. Perfectly fine
> according to specification.
>
> I suggest you just use If-Modified-Since. Any client that relies on
> unspecified behavior of specifications is just asking to be broken.
>
>
>
> You have got to be kidding!!
>
> The static content handler in IIS sends both ETag and Last-Modified
> headers
> with its response.
> IE on re-requestimg the resource will send both If-Modified-Since and
> If-None-Match.
> If HTTP.SYS decides thats a bad request then you're in deep do-do.
>
> --
> Anthony Jones - MVP ASP/ASP.NET



Well, either change the spec, change the server, or change the
client...


>>>>>


The spec merely says the behaviour isn't defined, that doesn't give the
server license to do something daft like 400 Bad Request. Especially since
in most of these cases using either header would choose the same resource
anyway.

You're not seriously suggesting that HTTP.SYS is supposed to be behaving
this way when it receives a form of request that even Microsoft's own
browser commonly generates?? In fact I can't see how that can be so else
the common combination of IE6/7 client/IIS6 server would already be broken
and all hell would have already been released.

--
Anthony Jones - MVP ASP/ASP.NET

Reply With Quote
  #8  
Old 10-19-2008, 02:25 AM
David Wang
Guest
 
Default Re: IIS 6.0 and Kernel Cache Problem

On Oct 18, 9:56*am, "Anthony Jones" <AnthonyWJo...@yadayadayada.com>
wrote:
> "David Wang" <w3.4...@gmail.com> wrote in message
>
> news:26c94d2d-2aa4-4701-a3c0-c777cb854c06@s1g2000prg.googlegroups.com...
> On Oct 17, 2:35 am, "Anthony Jones" <AnthonyWJo...@yadayadayada.com>
> wrote:
>
>
>
>
>
> > "David Wang" <w3.4...@gmail.com> wrote in message

>
> >news:5d982ac9-c5bb-4a1b-8df8-d348e3077ef4@v16g2000prc.googlegroups.com....
> > What you see is correct as specified by RFC2616 for HTTP/1.1.

>
> > The relevant section:

>
> > The result of a request having both an If-None-Match header field and
> > either an If-Match or an If-Unmodified-Since header fields is
> > undefined by this specification.

>
> > --> The kernel response cache returns 400 Bad Request. Perfectly fine
> > according to specification.

>
> > I suggest you just use If-Modified-Since. Any client that relies on
> > unspecified behavior of specifications is just asking to be broken.

>
> > You have got to be kidding!!

>
> > The static content handler in IIS sends both ETag and Last-Modified
> > headers
> > with its response.
> > IE on re-requestimg the resource will send both If-Modified-Since and
> > If-None-Match.
> > If HTTP.SYS decides thats a bad request then you're in deep do-do.

>
> > --
> > Anthony Jones - MVP ASP/ASP.NET

>
> Well, either change the spec, change the server, or change the
> client...
>
>
>
> The spec merely says the behaviour isn't defined, that doesn't give the
> server license to do something daft like 400 Bad Request. * Especially since
> in most of these cases using either header would choose the same resource
> anyway.
>
> You're not seriously suggesting that HTTP.SYS is supposed to be behaving
> this way when it receives a form of request that even Microsoft's own
> browser commonly generates?? *In fact I can't see how that can be so else
> the common combination of IE6/7 client/IIS6 server would already be broken
> and all hell would have already been released.
>
> --
> Anthony Jones - MVP ASP/ASP.NET- Hide quoted text -
>
> - Show quoted text -



Correct. Either IE and IIS are already horribly broken, or something
else is really going on.

In either case, my recommendation still applies.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 10:05 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.