We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using node-spdy to start the http2 server, some special request methods cannot be recognized.
For some strange request methods,req.method is null
req.method
null
index.js
var spdy = require('spdy'); var fs = require('fs'); var options = { // Private key key: fs.readFileSync(__dirname + '/key.pem'), // Fullchain file or cert file (prefer the former) cert: fs.readFileSync(__dirname + '/cert.pem'), // **optional** SPDY-specific options }; var server = spdy.createServer(options, function (req, res) { res.writeHead(200); res.end('method:' + req.method); }); server.listen(3000);
package.json
{ "dependencies": { "spdy": "^4.0.2" } }
node -v v14.3.0
node index.js
Open it in chrome browser.
https://localhost:3000/
Enter the following code in the console in devtools,
fetch(location.href,{method:"GET"}).then(r=>r.text()).then(console.log) Promise {<pending>} method:GET
I made a HEAD method request but received the response body?
fetch(location.href,{method:"HEAD"}).then(r=>r.text()).then(console.log) Promise {<pending>} method:HEAD
Initiating certain requests, the method cannot be correctly identified.
fetch(location.href,{method:"MKWORKSPACE"}).then(r=>r.text()).then(console.log) Promise {<pending>} method:null
fetch(location.href,{method:"VERSION-CONTROL"}).then(r=>r.text()).then(console.log) Promise {<pending>} method:null
fetch(location.href,{method:"UPDATE"}).then(r=>r.text()).then(console.log) Promise {<pending>} method:null
The text was updated successfully, but these errors were encountered:
@indutny @anandsuresh @eee-c @anandsuresh @daviddias
Sorry, something went wrong.
No branches or pull requests
Using node-spdy to start the http2 server, some special request methods cannot be recognized.
For some strange request methods,
req.method
isnull
index.js
package.json
Open it in chrome browser.
Enter the following code in the console in devtools,
I made a HEAD method request but received the response body?
Initiating certain requests, the method cannot be correctly identified.
The text was updated successfully, but these errors were encountered: