mirror of
https://github.com/unmojang/authlib-injector.git
synced 2025-09-30 06:40:47 -04:00
nanohttpd: reset parsedInputStream & continueSent between requests
fix #83 bug description: if tcp keep-available is on, after processing a POST request, parsedInputStream's value is retained. if the next request is a GET request, HttpSession.getInputStream() will not return null as expected.
This commit is contained in:
parent
3d3dd29f33
commit
d72035a066
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019 Haowei Wen <yushijinhun@gmail.com> and contributors
|
* Copyright (C) 2020 Haowei Wen <yushijinhun@gmail.com> and contributors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -397,11 +397,13 @@ public abstract class NanoHTTPD {
|
|||||||
|
|
||||||
} else /* if both are null */ {
|
} else /* if both are null */ {
|
||||||
// no request payload
|
// no request payload
|
||||||
|
parsedInputStream = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
expect100Continue = "HTTP/1.1".equals(protocolVersion)
|
expect100Continue = "HTTP/1.1".equals(protocolVersion)
|
||||||
&& "100-continue".equals(this.headers.get("expect"))
|
&& "100-continue".equals(this.headers.get("expect"))
|
||||||
&& parsedInputStream != null;
|
&& parsedInputStream != null;
|
||||||
|
continueSent = false;
|
||||||
|
|
||||||
// Ok, now do the serve()
|
// Ok, now do the serve()
|
||||||
this.isServing = true;
|
this.isServing = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user