It looks as though Flash isn't sending the added headers for
Authorization or X-If-No-Redirect.  The raw packet capture does not
include this information either..

Unfortunately, I'm not very familliar with actionscript development,
so I'm not sure what is preventing flash from sending the headers,
though there doesnt appear to be any redirect problems involved here
(based off the packet capture).  I've looked at the documentation for
addRequestHeader, but can't see any reason why it would refuse to add
the headers you specified.  Perhaps someone on a Flash group may be
able to provide assistance?

Fyi - in the case that this is working, you may not want to post the
actual headers publicly, as the GoogleLogin credentials could be used
by someone else.

It looks like you can probably use Fiddler to detect when it starts
working.

Best of luck.

Cheers,

-Ryan

On Jan 2, 7:54 pm, "Jesse Warden" <[EMAIL PROTECTED]> wrote:
I'm not sure how to read the packets, but I did my best to record a clean
session.  The first is a successful login.  The second is a successful login
with a subseqent request for the calendar feed that 401's on me.  I have the
X-If-No-Redirect in the request.

http://www.jessewarden.com/login_01.pcap

http://www.jessewarden.com/login_02.pcap

I'm using both ServiceCapture and Fiddler, and neither seems to be showing
all of my headers.  I'm not sure if Flash is preventing me from adding
headers since a few are reserved for security reasons, but X-If-No-Redirect
isn't listed as disallowed.  Anyway, the sequence goes:

request: CONNECTwww.google.com:443HTTP/1.0
response: HTTP/1.0 200 Connection Established

request: GET /calendar/feeds/[EMAIL PROTECTED] HTTP/1.1
response: HTTP/1.1 401 Authorization required

Raw headers from above, in order:

CONNECTwww.google.com:443HTTP/1.0
User-Agent: Shockwave Flash
Host:www.google.com:443
Content-Length: 0
Proxy-Connection: Keep-Alive
Pragma: no-cache

HTTP/1.0 200 Connection Established

GET /calendar/feeds/[EMAIL PROTECTED] HTTP/1.1
Referer:
file:///C|/Documents%20and%20Settings/Syle/My%20Documents/%5FProjects/Google%20Calendar%20Flash%20Lite/classes/tests/GetCalendarsTest.swf
x-flash-version: 9,0,29,8
User-Agent: Shockwave Flash
Host:www.google.com
Pragma: no-cache
Cookie:
PREF=ID=2868efc7d9dcb874:TM=1164217954:LM=1164217954:S=goOfuUs7iniESNog

HTTP/1.1 401 Authorization required
Content-Type: application/atom+xml; charset=UTF-8
WWW-Authenticate: GoogleLogin realm="https://www.google.com/accounts";
Cache-control: private
Content-Length: 167
Date: Wed, 03 Jan 2007 03:52:32 GMT
Server: GFE/1.3

I hope this helps!

On 1/2/07, Ryan Boyd (Google) <[EMAIL PROTECTED]> wrote:



> There have been some changes since November 4th, but they have been
> mostly bug fixes and nothing that should be causing a 401 error.

> Are you able to do a packet capture to determine the series of
> operations which are occurring?  The tool which I use for these sorts
> of things is Wireshark -http://www.wireshark.org/(available for
> multiple platforms).  You could also use a HTTP debugging proxy such as
> Fiddler if you're running under Windows (http://www.wireshark.org/), or
> the packet capture tool tcpdump if you're on a mac/linux/unix box:
> sudo tcpdump -i en1 -s0 -w packets.out 'hostwww.google.comand tcp
> port 80'

> If Flash is correctly sending the X-If-No-Redirect header with a value
> of 1, then you should get back a '412 Precondition Failed' response,
> which will include a 'X-Redirect-Location' header and a 'S' cookie
> which you can then use to redo your request.

> Hope this helps!

> Cheers,

> -Ryan

> On Jan 2, 2:21 pm, "JesterXL" <[EMAIL PROTECTED]> wrote:
> > I'm using the Google Calendar API for clients as detailed here:

> >http://code.google.com/apis/gdata/calendar.html

> > As of November 4th of 2006, I was able to login, and then add an event
> > to my calendar.

> > Today I can't.  I have a series of test cases I've created in Flash
> > (Flash Player 7, ActionScript 2), and now none work.  The login works
> > fine on all, though.  I get a HTTP status of 200 back, and get my auth
> > code.

> > However, whether adding an event, or merely hitting the feed API
> > results in a 401.

> > Searching this group, it seems a few people were suffering from a
> > redirect problem.  I'm not really sure I have that low-level access in
> > Flash to fix the redirect problem, but am definately open to hacks.  I
> > tried to "X-If-No-Redirect" request header, but she didn't work.

> > Did anything change?  Anything I can try?

> > Thanks if you can help.

> > --JesterXL


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Google 
Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to