Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 704 [details]
.cs Source, PCAP files captured, and binary built from VS2010
This is related to System.Net.HttpWebRequest class.
When using "POST" Method and having written data to GetRequestStream(), after this if we add an HTTP Header [using request.Headers.Add("key","value")], this header will not be sent in actual HTTP request. I have verified this using tcpdump/Wireshark.
1) Build from 'HttpHeaderTest.cs' from attached archive file.
2) Run a TCP traffic sniffer, e.g. $ tcpdump -i eth0 -s 0 -w output.pcap
3) Run the test app $ mono HttpHeaderTest.exe. It will send a POST to mono-project.com and exit shortly
4) End the network capture.
5) Check the HTTP headers. There is no custom header we added.
Our custom header should be included in the HTTP header. With MS .NET Framework, the header is included [see windows_net40_vs2010.pcap]
Other affected versions:
Found this in 2.6.7 as well.
By adding Header before writing POST's body using 'GetRequestStream()', the header is encoded correctly.
I have fixed this issue in master/8e67b8c2.
If there are no problems with this change, I will push it to the mono-2-10 branch in ~1 month.
I will leave this issue open until then.
Thanks for the swift response, Gonzalo.
Applied to mono-2-10