Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submitted XML POST data is stripped of markup #371

Open
spemberton opened this issue Jul 27, 2017 · 2 comments
Open

Submitted XML POST data is stripped of markup #371

spemberton opened this issue Jul 27, 2017 · 2 comments

Comments

@spemberton
Copy link

I posted something along the lines of this (details might slightly differ)

POST / HTTP/1.1
Connection: keep-alive
Content-Type: application/xml
Accept: /
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,nl-NL;q=0.8,nl;q=0.6,en-US;q=0.4,en;q=0.2
Origin: http://homepages.cwi.nl
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Dnt: 1
Referer: http://homepages.cwi.nl/~steven/forms/examples/michiel3.xml
Content-Length: 907

predictionThe web failsNot yet...

Sorry.W3C5I like this formotherHello mum!5ISOC W3Ctechnical+31steven@pemberton.nltrueTim Berners-Leetimbl@w3.orgFred Bloggsfred@blogs.netNoWeb wouldn't fail!About a yearParallelUK govtPeople
Money
Wine

and got back

{ "args": {}, "data": "predictionThe web failsNot yet\n\nSorryW3C5I like this formotherHello mum!ISOC W3C+310steven@pemberton.nltrueTimbltimbl@w3.orgFred Bloggsfred@bloggs.net", "files": {}, "form": {}, "headers": { "Accept": "text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, /;q=0.1", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-GB,en-US;q=0.9,en;q=0.8,nl-nl;q=0.7,nl;q=0.6,fr;q=0.5", "Connection": "close", "Content-Length": "654", "Content-Type": "application/xml", "Host": "httpbin.org", "Origin": "http://homepages.cwi.nl", "Referer": "http://homepages.cwi.nl/~steven/forms/examples/michiel3.xml", "User-Agent": "Opera/9.80 (X11; Linux x86_64) Presto/2.12.388 Version/12.16" }, "json": null, "origin": "82.161.119.74", "url": "http://httpbin.org/post" }

In other words, for an XML POST the data: field of the returned values has been stripped of its markup.

@spemberton
Copy link
Author

Hmm, the markup has been stripped from my POST data as well :-) It should start

<data xmlns=""><answers><type>prediction</type><answer type="prediction"><description>The web fails

@javabrett
Copy link
Contributor

@spemberton can you update the issue and take care to code-escape the example request, or use a pastebin. Currently it is not readable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants