-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
mitm return 400 on custom methods #63
Comments
Hey, While I'm not sure what responds with 400 instead of just blowing up, you're right that Mitm.js doesn't seem to support custom HTTP methods. Node.js v6 for example just throws "socket hang up". Turns out Node.js' web server itself doesn't support custom HTTP methods — nodejs/node-v0.x-archive#3192. That came as a surprise to me. Because Mitm.js delegates HTTP request parsing to Node.js itself, Mitm.js can't support custom methods out of the box either. If you've got a custom HTTP parser, you could, however, hack support for that, I suppose, by overwriting Let me know what you decide to do. |
I've added a note to the README: https://github.com/moll/node-mitm#custom-http-methods. |
I didn't notice nodejs was blocking custom methods. |
I didn't know that either. Seems like a fairly arbitrary limitation on Node.js's part. |
RFC 2616 and 7540 allow use of custom methods.
When we use other methods, mitm always return 400 without running request event.
The text was updated successfully, but these errors were encountered: