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
Endless get request starting 0.6.7+1 version #64
Comments
Can you provide a pure-Dart reproduction with a Dart HTTP client? |
See following example that works on shelf 0.6.7 and doesn't work with next version import 'dart:async';
import 'package:shelf/shelf.dart' as shelf;
import 'package:shelf/shelf_io.dart' as io;
Future<Null> main(List<String> args) async {
var handler = const shelf.Pipeline()
.addMiddleware(shelf.logRequests())
.addHandler(echoRequest);
var server = await io.serve(handler, '127.0.0.1', 8080);
print('Serving at http://${server.address.host}:${server.port}');
}
shelf.Response echoRequest(shelf.Request request) {
return new shelf.Response.ok(null);
} Use following command to simulate the request, the command doesn't complete.
Compared to results from 0.6.7 version, the |
This turns out to be pretty complex. Some of the assumptions I was making about HTTP header validity turn out to have been wrong, but fixing them will involve coming up with a consistent model for how the Content-Length and Transfer-Encoding headers interact with one another and with adapters, which is non-trivial, especially in the face of a number of |
I did run into it too. I'm using shelf_cors middleware, which does this:
Quick fix/workaround for anyone out there is to return something:
|
I should have a fixed version of |
This should be the last CL in this unfortunate series. The adapter requirements have been updated to consistently ensure that a Message's body is in the chunked format if and only if its headers indicate that it should be. Closes #64
This should be the last CL in this unfortunate series. The adapter requirements have been updated to consistently ensure that a Message's body is in the chunked format if and only if its headers indicate that it should be. Closes #64
This should be the last CL in this unfortunate series. The adapter requirements have been updated to consistently ensure that a Message's body is in the chunked format if and only if its headers indicate that it should be. Closes #64
In my application, when a OPTIONS request is done, the server didn't answer (in the network console, the request is pending for 3 minutes).
The issue occurs on Dartium, Chrome, Safari, Firefox.
The same case is running well with previous Shelf versions.
The text was updated successfully, but these errors were encountered: