geremyk / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

GDataRequest.UseGZip doesn't work #171

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a CalendarService with UseGZip property in true:
CalendarService service = new CalendarService("CalendarSample");
service.setUserCredentials(username, password);
service.RequestFactory.UseGZip = true;

2. Create an EventQuery:
EventQuery query = new
EventQuery(@"http://www.google.com/calendar/feeds/default/private/full");

3. Get the feed:
AbstractFeed feed = service.Query(query) as AbstractFeed;

What is the expected output? What do you see instead?
The HTTP response should be gzipped and its ContentEncoding should be
"gzip" (see request.cs line 658, client library 1.2.2.0). Instead the
ContentEncoding is an empty string and the response is not compressed.

What version of the product are you using? On what operating system?
.NET client libraries 1.2.2.0, WinXP

Please provide any additional information below.
The first thing to note is that a first request is made to the calendar
service with "Accept-Encoding: gzip" and the response is a redirection. The
second request to the redirected URL does *not* include "Accept-Encoding:
gzip". I tried to set this header manually for the second request but it
didn't work either. I thought it was a server issue and reported it (see
http://code.google.com/p/gdata-issues/issues/detail?id=777) but the answer
was it's a client library issue. Attached is a log of the HTTP traffic for
both requests mentioned.

Regards

Original issue reported on code.google.com by capt.ho...@gmail.com on 19 Sep 2008 at 12:00

Attachments:

GoogleCodeExporter commented 8 years ago
I think it's my fault. I was requesting the feed to
http://www.google.com/calendar/feeds/default/public/full. After playing for a 
while I
found that only https://www.google.com/calendar/feeds/default/public/full (note 
the
https) will return GZip encoded responses. I don't know if this is the expected
behavior but at least it works.

On the other side, I've found something weird. When there's a next chunk (the 
first
request didn't get all the requested data) the EventFeed.NextChunk has the 
correct
path, but its scheme is HTTP, not HTTPS. Should I report this on the server 
issues
tracker?

Thanks!

Regards

Original comment by capt.ho...@gmail.com on 22 Sep 2008 at 2:47

GoogleCodeExporter commented 8 years ago
After doing lots of tests I've found this has nothing to do with the client 
library
nor the calendar server but with something between the server and me that is
uncompressing the feed data. Please close this issue since my point is _plain 
wrong_ :)
Sorry for any inconveniences.

Original comment by capt.ho...@gmail.com on 23 Sep 2008 at 11:11

GoogleCodeExporter commented 8 years ago
no problem. Just glad it is working for you now :) 

Original comment by fman...@gmail.com on 24 Sep 2008 at 4:41