Created
September 13, 2011 09:55
-
-
Save X4/1213507 to your computer and use it in GitHub Desktop.
POST bug in google chrome/chromium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "gwan.h" | |
| int main(int argc, char *argv[]) | |
| { | |
| xbuf_t *reply = get_reply(argv); | |
| xbuf_cat(reply, | |
| "<form method='POST'>" | |
| "<input name='post' type='text' value='Testing POST' />" | |
| "<input type='submit' value='POST'/>" | |
| "</form>" | |
| ); | |
| char *post = ""; | |
| get_arg("post=", &post, argc, argv); | |
| http_t *http = get_env(argv, HTTP_HEADERS, 0); | |
| xbuf_xcat(reply, "<span>Browser: %s</span>", http->h_useragent); | |
| xbuf_xcat(reply, "<script type=\"text/javascript\">console.log('POST: %s')</script>", post); | |
| return 200; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment