asolfre / appengine-rest-server

Automatically exported from code.google.com/p/appengine-rest-server
Other
0 stars 0 forks source link

not well-formed (invalid token) while post request #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create app
2. Run dev_appserver.py
3. try request with curl

~/www/woa-toolkit/apps/Relviewmodel $ curl -vv -d "note=asfdadasdssdfsdfsss" 
"http://localhost:8080/rest/notes/"

* About to connect() to localhost port 8080 (#0)
*   Trying ::1... Connection refused
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST /rest/notes/ HTTP/1.1
> User-Agent: blabla
> Host: localhost:8080
> Accept: */*
> Content-Length: 24
> Content-Type: application/x-www-form-urlencoded
> 
* HTTP 1.0, assume close after body
< HTTP/1.0 500 Internal Server Error
< Server: Development/1.0
< Date: Mon, 12 Sep 2011 19:48:48 GMT
< Content-Type: text/html; charset=utf-8
< Cache-Control: no-cache
< Expires: Fri, 01 Jan 1990 00:00:00 GMT
< Content-Length: 1126
< 
<pre>Traceback (most recent call last):
  File &quot;/google_appengine/google/appengine/ext/webapp/_webapp25.py&quot;, line 703, in __call__
    handler.post(*groups)
  File &quot;~/www/gae/notes/rest/__init__.py&quot;, line 1441, in post
    self.post_impl()
  File &quot;~/www/gae/notes/rest/__init__.py&quot;, line 1458, in post_impl
    self.update_impl(path, model_name, model_key, &quot;POST&quot;, False)
  File &quot;~/www/gae/notes/rest/__init__.py&quot;, line 1483, in update_impl
    doc = self.input_to_xml()
  File &quot;~/www/gae/notes/rest/__init__.py&quot;, line 1698, in input_to_xml
    return minidom.parse(self.request.body_file)
  File &quot;/usr/lib/python2.6/xml/dom/minidom.py&quot;, line 1918, in parse
    return expatbuilder.parse(file)
  File &quot;/usr/lib/python2.6/xml/dom/expatbuilder.py&quot;, line 928, in parse
    result = builder.parseFile(file)
  File &quot;/usr/lib/python2.6/xml/dom/expatbuilder.py&quot;, line 207, in parseFile
    parser.Parse(buffer, 0)
ExpatError: not well-formed (invalid token): line 1, column 4
* Closing connection #0

~/www/gae/notes/rest $ svn info
Path: .
URL: http://appengine-rest-server.googlecode.com/svn/trunk
Repository Root: http://appengine-rest-server.googlecode.com/svn
Repository UUID: 8fab00bc-bfc3-11dd-b7f4-ab9653f8cbb3
Revision: 62
Node Kind: directory
Schedule: normal
Last Changed Author: jahlborn
Last Changed Rev: 62
Last Changed Date: 2011-08-06 15:11:59 +0300 (Sat, 06 Aug 2011)

App code in attach

Original issue reported on code.google.com by plcgi1@gmail.com on 12 Sep 2011 at 7:56

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Sorry - bad tick - close or delete it ))

Original comment by plcgi1@gmail.com on 12 Sep 2011 at 8:45

GoogleCodeExporter commented 9 years ago

Original comment by jahlborn@gmail.com on 12 Sep 2011 at 11:28