I'd guess your client script is making a malformed HTTP request and
the server you're running your PHP script on is more forgiving than
the AppSpot one.  I'd expect the 400 error to be returned by the
server before it even tries to run your python script; it *should*
mean that the server has no idea what to do with the HTTP request it
got; if your script had a problem you should be seeing a 500 error.

On Sep 5, 9:23 am, rive <[EMAIL PROTECTED]> wrote:
> I do an multipart post to "http://rive.appspot.com/services/
> CountriesService.py"
>
> But I keep getting 400 bad requests back?? The file is really online.
> This is the server side file I have online. (the same client side code
> works perfect with PHP)
>
> from google.appengine.api import images
> from google.appengine.api import users
> from google.appengine.ext import db
> from google.appengine.ext import webapp
> from Model import tblMapCountries, DTO
>
> class CountriesService(webapp.RequestHandler):
>     def post(self):
>         if users.is_current_user_admin():
>
>             country = tblMapCountries()
>             country.country = self.request.get("country")
>             uploadimage = images.resize(self.request.get("Filedata"),
> 25, 20, images.PNG)
>             country.flag = db.Blob(uploadimage)
>             country.put()
>             return "inserted in db app engine"
>         else:
>             return "kiekeboe"
--~--~---------~--~----~------------~-------~--~----~
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