wink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryant Luk <bryant....@gmail.com>
Subject Re: Default value for If-Modified-Since Header parameter
Date Fri, 05 Aug 2011 14:25:09 GMT
Hi Shinoj,

If you used another client (curl for instance) and submit a request,
does the If-Modified-Since request header have a value on the server?
It may just be your Firefox plugin that's sending the value across the
wire because it's using Firefox's cache mechanism and acting "smart".

On Fri, Aug 5, 2011 at 5:49 AM, Shinoj kk <kshinojk@gmail.com> wrote:
>
> Hi,
>
> I am using RestClient plug-in in FireFox to test my RESTful webservice
> application. I am facing below problem while using "If-Modified-Since"
> request header.
>
> "Eventhogh I am not giving the If-Modified-Since header parameter explicitly
> with the request I am getting some default value for this parameter and I am
> getting '304 Not-Modified' response from the server instead of '200 OK' "
> I analysed more and found that the default value  coming as the value of
> If-Modified-Since is equal to the Last-Modified Response heder.
>
> See below the way I am retrieving the If-Modified-Since value from the
> MessageContext object.
>
> MessageContext context
> .......
>
> HttpHeaders headers = context.getHttpHeaders();
>
> ........
>
> List<String> ifModifiedSince =
> headers.getRequestHeader("If-Modified-Since");
> if (ifModifiedSince != null && ifModifiedSince.size() > 0) {
>  transactionInformation.setIfModifiedSince(ifModifiedSince.get(0));
>
>  /* value of ifModifiedSince.get(0) : Sun, 05 Dec 2010 02:22:37 GMT    ---->
> Same as Last-Modified */
>
> }
>
> ......
>
> Please help me to resolve this problem.
>
>
> Thanks,
> Shinoj

Mime
View raw message