The Google Labs team and Marzia discovered that I was using an
improper boundary string in the construction of my multipart/form-data
body. My separator was this:

  var filenameTimestamp = (new Date().getTime());
  var separator = "----------12345 multipart boundary " +
filenameTimestamp;
  ...
  req.setRequestHeader("Content-type", "multipart/form-data;
boundary=" + separator);

ie with spaces, but the separator was not quoted in the Content-type.
Seems like lots of servers don't mind the spaces, but it is not
correct.

Removing the spaces from the separator fixed the problem.

Thanks!

On Nov 10, 4:35 pm, Marzia Niccolai <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Do you have the exact contents of one of these requests available?  Also the
> app id and domain name would be helpful.  As always, if you aren't
> comfortable providing this info in the groups, you can reply with it
> directly to me.
>
> -Marzia
>
> On Sat, Nov 8, 2008 at 12:37 PM, Gijsbert <[EMAIL PROTECTED]>wrote:
>
>
>
> > Hi,
>
> > I have a Firefox extension that sends an XMLHttpRequest multipart/form-
> > data request to my GAE application to upload a png screengrab (request
> > uses code taken from
> >http://blog.footle.org/2007/07/31/binary-multipart-posts-in-javascript/).
> > All is well on my dev server and on .appspot.com.
> > However, sending the same request to the same app through my own
> > domain (registered through Google Apps, CNAME with ghs.google.com)
> > gives me HTTP status 502 Bad Gateway after about 20 seconds. The
> > message body has some blurp about temporary error and try again in 30
> > seconds, but retrying gives the same result.
>
> > Does anybody have an idea on how to debug this further?
> > The logs on the admin console on appspot.com does not show any
> > activity for these requests. And the logs for the same request to
> > appspot.com look fine, they don't take very long (<400ms,
> > <1000mcycles) and return less than 1KB json status (I am testing with
> > small screengrabs, so the form-data is < 10KB).
> > I believe ghs.google.com proxies requests, is there some restriction
> > there?
>
> > Thanks,
> > Gijsbert
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to