-
Notifications
You must be signed in to change notification settings - Fork 1
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
extract URL Params from HTML Form #1
Comments
That HTML form in your example is not complete. Did it have a title, desc, and Date field? Mongrel2 request netstrings have two parts: a) headers, b) body. The body in this example is "72:title=sdgfsdfg&desc=fdsgsdf&tDate=10-1-2012,". I that your data? |
That HTML form in your example is not complete. Did it have a title, desc, Mongrel2 request netstrings have two parts: a) headers, b) body. The body On Thu, Feb 9, 2012 at 10:30 PM, zenwong <
|
ya that's my data, the html form had the correct form fields. whenever i try posting from the html form, it seems I get the query string in the body part. <label for"title">Title :
those are the form fields, i've omitted the rest of the html structure in this post, but it is in there in my html file. I just wanted to show what data has been submitted after the html form is submitted. |
Hi there, I've been trying to extract the url parameters from a HTML form with your library. I am ale to get extract the params using jansson to extract the QUERY param from the return req->headers. So when I do curl -X POST 'localhost/form?title=TITLE&desc=DESC&date=DATE' i am able to get back title desc and date. But when I submit my html form it doesn't seem to pick up the query params, not sure what I'm supposed to put in the html form action.
the html form
the netstring
======NETSTRING======
54c6755b-9628-40a4-9a2d-cc82a816345e 2 /form 622:{"PATH":"/form","x-forwarded-for":"127.0.0.1","cache-control":"max-age=0","origin":"http://dev.l","content-type":"application/x-www-form-urlencoded","accept-language":"en-US,en;q=0.8","accept-encoding":"gzip,deflate,sdch","connection":"keep-alive","content-length":"72","referer":"http://dev.l/","accept-charset":"ISO-8859-1,utf-8;q=0.7,*;q=0.3","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7","host":"dev.l","METHOD":"POST","VERSION":"HTTP/1.1","URI":"/form","PATTERN":"/form"},72:title=sdgfsdfg&desc=fdsgsdf&tDate=10-1-2012,
as you can see theres no QUERY field.
The text was updated successfully, but these errors were encountered: