Bug 19882 - Reusing of HttpConnection for HttpListenerContext
Summary: Reusing of HttpConnection for HttpListenerContext
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: 3.4.0
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: marcos.henrich
URL:
Depends on:
Blocks:
 
Reported: 2014-05-19 00:40 UTC by architrungta120
Modified: 2014-11-03 06:42 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description architrungta120 2014-05-19 00:40:36 UTC
Based on http://stackoverflow.com/questions/23720440/connection-drop-in-httplistener-in-c-sharp-mono/23721589

FlushInput() in HttpListenerRequest fails if the Request.InputStream has been disposed. In .Net the context is reused even if the stream is disposed but not in Mono.
Comment 1 marcos.henrich 2014-05-27 05:16:32 UTC
Hi Archit.

Thanks for reporting this bug. I was not able to reproduce the bug, my attempt is here https://gist.github.com/esdrubal/5549ebbd65849b3a850c. 

Can you share more details about your method Helpers.GetRequestBody and possibly change my attempt to reproduce the bug into something that fails?
Comment 2 architrungta120 2014-05-27 09:01:52 UTC
Hi Marcos,

I verified using a packet sniffer that the requests are indeed not being reused. So the test did fail of sorts
Comment 3 marcos.henrich 2014-07-31 08:20:22 UTC
The pull request for this issue can be found in the link below.
https://github.com/mono/mono/pull/1185
Comment 4 marcos.henrich 2014-11-03 06:42:15 UTC
Fixed in master e5fc5450dd38f1b04cda2041e7ad0628e83f54b2.
https://github.com/mono/mono/commit/e5fc5450dd38f1b04cda2041e7ad0628e83f54b2