Commit Graph
783 Commits
Author SHA1 Message Date
David Shulman 448f50aa8d Fix HTTP/2 option setting in WinHttpHandler
The WinHTTP team has recommended that we always set the HTTP/2 options
explicitly when setting up the WinHTTP request handle. Future versions
of Windows might adjust the WinHTTP default value for this setting.
So, by always setting the value at the WinHTTP layer, we can ensure
that we have a stable default value at the .NET layer.


Commit migrated from https://github.com/dotnet/corefx/commit/d553cb46c0da91406e55b756160cfa87e2ee2f68
2017-06-09 08:44:03 -07:00
David Shulman 7991f4d912 Fix WinHttpResponseStream when reading 0 bytes
Fixes dotnet/corefx#20676


Commit migrated from https://github.com/dotnet/corefx/commit/f6e51aec3270102234386454063d66251f3b901b
2017-06-05 10:43:39 -07:00
Eric St. John af1d155bf6 Remove help VS comments
Many CSProjs included the comment
`<!-- Help VS understand available configurations -->`

These aren't handled well by the tooling that rewrites projects and weren't providing much value.

Remove them.


Commit migrated from https://github.com/dotnet/corefx/commit/5ba948d13e3177c2c7075b6b00791e574bfa0860
2017-05-25 11:10:27 -07:00
Caesar Chen abdd0efdda delete a wrong assert
Commit migrated from https://github.com/dotnet/corefx/commit/c8aa79e486855542f0db7cf28438c752f5c2c8e4
2017-05-22 21:23:23 -07:00
Caesar Chen bcf2c19a0a address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/47043bf23538d31cc9d2eb567166afb7a20713d3
2017-05-22 10:52:24 -07:00
Caesar Chen 97abb996fd address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/6cb9019fa80591c0a714354f36a607be0ddb7c49
2017-05-21 16:48:19 -07:00
Caesar Chen bdcbb5bf95 change error message
Commit migrated from https://github.com/dotnet/corefx/commit/485d6b2e583b103eae6e352947de3b4ae3308189
2017-05-19 15:44:03 -07:00
Caesar Chen a3ecd08fed add if DEBUG
Commit migrated from https://github.com/dotnet/corefx/commit/b991a4101f6d415c502bd303395bc4f4abbb8d8f
2017-05-19 15:33:59 -07:00
Caesar Chen 7d8db04de1 address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/1f9e38f8518eb1bb98f0c12effacb4da73e9fbfc
2017-05-19 15:21:38 -07:00
Caesar Chen 37f01c684f fix comment
Commit migrated from https://github.com/dotnet/corefx/commit/0aa434111f18f359da487228835d7bd0509ec5ae
2017-05-19 13:48:07 -07:00
Caesar Chen cb13973e33 Add instrumentation for now to catch unexpected errors and fail fast and produce a crash dump
Commit migrated from https://github.com/dotnet/corefx/commit/eb28853edaa8f3efcce225e3cbec5e1500be57b4
2017-05-19 11:46:13 -07:00
Eric St. John e02c675179 Increment versions post 2.0
Commit migrated from https://github.com/dotnet/corefx/commit/6c5f87319a4785499008c95b2ff5e7f13a413d22
2017-05-16 14:12:16 -07:00
Wes Haggard 96ed7c688b Merge pull request dotnet/corefx#19638 from AlexGhiondea/MoreAttributes
Manually add the attribute for projects that don't reference S.R.Inte…

Commit migrated from https://github.com/dotnet/corefx/commit/5d99f343ce6a3236cd7a74800f5e55444fffe789
2017-05-11 15:05:17 -07:00
Alex Ghiondea 9937e9a94d Manually add the attribute for projects that don't reference S.R.InteropServices but have DllImports.
Commit migrated from https://github.com/dotnet/corefx/commit/e432fb60c53342c7f543f8f3387317bd66ea8c00
2017-05-10 20:16:41 -07:00
Lakshmi Priya Sekar d13b95a549 Fixing OID EKU validation.
Commit migrated from https://github.com/dotnet/corefx/commit/023ecc91671ea48a0e27d466d13003d4830d671a
2017-05-10 13:29:13 -07:00
Sepideh Khoshnood 9214b25a4f Add nice messages for assemblies with autogenerated PNSE (dotnet/corefx#19506)
* Add nice messages for assemblies with autogenerated PNSE

* Fix failing builds

* Apply feedback

* Temporary workaround for Microsoft.Win32.Registry which needs using System statement

* Add new resource files

* Temporary workaround for System.Security.Cryptography.Cng which needs using System statement on Unix platforms

* Update BuildTools version and use resource strings for all PNSE messages

* Fix builds

* Fix typo


Commit migrated from https://github.com/dotnet/corefx/commit/00b2a853429c896eb973ffc1bbff04b186ab5d07
2017-05-09 20:16:50 -07:00
Stephen Toub 85f212528e Add exception diagnostics to WinHttp
To help diagnose pernicious exceptions, this debug-build-only change augments exceptions created using CreateExceptionUsingError to include the calling thread's stack trace, so that when these exceptions are then moved to other threads and propagated there, we can better correlate where they came from.


Commit migrated from https://github.com/dotnet/corefx/commit/2c368e81d9d07f0d40edf36047e5b93e44db200b
2017-05-05 18:16:38 -04:00
David Shulman 84814a9303 Fix WinHttpHandler POST behavior with zero-length data
WinHttpHandler was incorrectly sending two zero-length chunks (a violation of HTTP protocol)
when POST'ing empty data using chunked encoding. The second zero-length chunk was ok since it
means end of data. The first zero-length chunk was because it was the empty string being encoded.

This was causing problems by sending extra data to WinHTTP and hence to the server. Any
subsequent requests to the server might get mis-understood by the server and the server would then
send back an error. That translated to getting a WinHTTP error (12152)
"The server returned an invalid or unrecognized response".

This is hard to repro except in the HttpListener tests because of the timing of when the extra
zero-length chunk of request data gets sent to the server. There is already an HttpClient unit test
for POSTing zero-length data using chunked encoding. But this but was not triggering this error
due to timing issues. Even the HttpListener test needed to be adjusted to force a consistent repro.

Added asserts to validate the logic of making sure that we don't try to chunk encode zero length
data.

Fixes dotnet/corefx#18869.


Commit migrated from https://github.com/dotnet/corefx/commit/dad35ea3d495798dd04da90dec68230063f1331e
2017-05-02 15:02:44 -07:00
David Shulman c7e96c847e Root cause PostScenarioTests (Http) test failures on NETFX
Fixed a test bug in PostAuthHelper which caused the wrong entity-body
semantics to get used during the test. This actually exposed a netfx
bug dealing with ambiguous semantics (Content-Length vs. chunked).

After fixing this test bug, it then exposed a product bug where we
leak an InvalidOperationException that isn't wrapped properly by an
HttpRequestException. The scenario that exposed this related to
POST'ing content that is non-rewindable and having to resubmit the
POST due to authentication challenges. This test was passing on
.NET Core because the test was written using the wrong assumptions.
It failed on .NET Framework which exposed the problem.

The InvalidOperationException comes from when a StreamContent's
SerializeToStreamAsync method is called and the content needs to be rewound.
If the content can't be rewound, then the exception is thrown with the
error message "The stream was already consumed. It cannot be read again."

Updated the WinHttpHandler and CurlHandler to wrap the InvalidOperationException
in an HttpRequestException. Updated the test accordingly.

Fixes dotnet/corefx#17621.


Commit migrated from https://github.com/dotnet/corefx/commit/e7e3c581870787d87393e674db22589ad56e944c
2017-04-25 09:40:33 -07:00
Eric St. John 4b59989faa Remove NotSupportedOnTargetFramework
NotSupportedOnTargetFramework was used to explicitly make a package fail
to install (due to ref/lib guardrails check) where it would otherwise
succeed.  This is no longer serving its purpose since NuGet removed the
guardrails check.  It's also creating a less desireable failure mode:
FileNotFound vs PlatformNotSupported.


Commit migrated from https://github.com/dotnet/corefx/commit/e7533ab2c24728a5937bfb68609e183833359b27
2017-04-18 13:28:59 -07:00
Eric St. John d0cfa6fdb0 Update project configurations
Commit migrated from https://github.com/dotnet/corefx/commit/e15f244ad68b70444ad77889e5f92043d245bcdb
2017-04-18 13:28:55 -07:00
Eric St. John 08a06887a3 Re-enable package validation and clean up package content
Commit migrated from https://github.com/dotnet/corefx/commit/72002dbb7e3e657adaeb002feca0399d9667a54b
2017-04-18 13:28:50 -07:00
Eric St. John d47f03fb56 Explicitly list paths for harvesting
Commit migrated from https://github.com/dotnet/corefx/commit/ec4d6f868eb6497216791fc158173e7123d6e73f
2017-04-18 12:20:30 -07:00
Wes Haggard 4185183e8c Updates how we define which key an assembly uses
Now instead of Use*Key a project can instead define the assembly key
in the project (genreally the common dir.pops for a project) using
the AssemblyKey property. The accepted values are Open, ECMA, MSFT,
Test.

This change allows for a repo to set the default key they want to use
for projects. In corefx we have switched the default to use the Open
key instead of the old BuildTools default of MSFT key.

As part of this update we are explicitly setting the AssemblyKey in
all the library projects (although it is really only necessary for
projects that aren't the default).

Also with this change we are updating all the new libraries that have
not yet shipped stable (compared to our 1.1 release) and making them
use the Open key. Which means that for prerelease dependencies there
might be some binary breaking changes to consume.

The following libraries ahven't shipped so there key is being
changed from MSFT to Open:
Microsoft.XmlSerializer.Generator
System.CodeDom
System.Configuration.ConfigurationManager
System.Data.Odbc
System.DirectoryServices
System.DirectoryServices.AccountManagement
System.DirectoryServices.Protocols
System.IO.Ports
System.Json
System.Memory
System.Net.HttpListener
System.Net.Mail
System.Net.ServicePoint
System.Net.WebClient
System.Net.WebProxy
System.Private.Xml
System.Private.Xml.Linq
System.Security.Cryptography.Xml
System.Security.Permissions
System.Transactions.Local
System.Web.HttpUtility


Commit migrated from https://github.com/dotnet/corefx/commit/ac09a797d09502ebab61f7167bb856846602e1e6
2017-04-10 12:51:50 -07:00
David Shulman 83ac5b6403 Fix MaxResponseHeadersLengthSemantics (dotnet/corefx#17796)
* Fix MaxResponseHeadersLengthSemantics

The new HttpClientHandler.MaxResponseHeadersLength property is defined differently from the similarly
named WebRequestHandler and HttpWebRequest properties. The units are supposed to be in Kilobytes
(1024 bytes). This problem was discovered while doing .NET Core vs. .NET Framework compat testing.

Fix the semantics to match the existing WebRequestHandler and HttpWebRequest properties. Adjust tests.

Contributes to dotnet/corefx#17691

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/170f7a5ac7f98f2076f0776c573e3188a390d565
2017-04-03 14:25:25 -07:00
Dan Moseley 742d1435c5 Stop Pinvoke check of S.N.H.WHH (dotnet/corefx#17759)
Commit migrated from https://github.com/dotnet/corefx/commit/6d9d8a8a590e6272dca09567f02bfafc52b3a117
2017-04-01 15:09:28 -07:00
David Shulman bde07f49a0 Adjust WinHttpHandler unit test for compression default
Commit migrated from https://github.com/dotnet/corefx/commit/b44a13af5ddedcb4d8f969af951c93f833e647d0
2017-03-30 14:14:06 -07:00
Caesar Chen 3300ba2048 Merge pull request dotnet/corefx#17207 from schen381/bugfix
Fix HttpClientHandler.ClientCertificates behavior

Commit migrated from https://github.com/dotnet/corefx/commit/f17d9286f3c35db4f0ba031ac498513e1dd4680c
2017-03-17 12:10:40 -07:00
Stephen Toub 0371ac1bad Disable SendAsync_SlowServerRespondsAfterDefaultReceiveTimeout_ThrowsHttpRequestException test
dotnet/corefx#17234

Commit migrated from https://github.com/dotnet/corefx/commit/c70580a8da67d2e4fdc33897c20aef33e3553404
2017-03-17 13:50:42 -04:00
Caesar Chen b6892a28ed change the test label and add string to the resource file of WinHttpHandler to correct build error
Commit migrated from https://github.com/dotnet/corefx/commit/f57d3f2b4ee02c1e7cdc0a7d649eeda7d7a680d4
2017-03-16 14:48:58 -07:00
Caesar Chen eb24955a77 fix the HttpClientHandler.ClientCertificates behaviour when ClientCertificateOption.Automatic is set
Commit migrated from https://github.com/dotnet/corefx/commit/72322773ec42b011622e8162acfdff4ecc3beb0c
2017-03-16 13:21:12 -07:00
Jose Perez Rodriguez 99adb0ad00 Adding System.Net.HttpListener uapaot config (dotnet/corefx#16982)
Adding System.Net.HttpListener uapaot config

Commit migrated from https://github.com/dotnet/corefx/commit/b8a38e2dff367296465982f300d47c5fda4489d6
2017-03-10 13:05:34 -08:00
Steve Harter 1380db7ec3 Change tests that use async void to async Task
Commit migrated from https://github.com/dotnet/corefx/commit/39883264a961957d29bd535e2854eed8056343f0
2017-03-10 10:47:53 -06:00
Dan Moseley 9d47195e42 Enable Pinvoke checker and baseline violations (dotnet/corefx#16704)
* Fix UWP Pinvoke checker condition

* analyzer baselines

* Remove redundant local define

* Remove redundant CA lines

* Special case Registry

* Fix BlockReflectionAttribute

* Replace NETNATIVE with uap define

* baselines

* Disable Pinvoke scan on specific projects

* Disable BlockReflectionAttribute on ilproj

* Revive 2 baselines

* Disable UWP validation on SQlClient

* Convert some defines to `uwp`

* Fix S.N.Primitives baseline

* Remove dead baselines

* Clean up NET_NATIVE defines

* Remove FEATURE_CORECLR except from shared sources

* Change Threading.Thread defines to just uapaot

* Fix comment

* Fix comment 2

* Change serialization uap defines to uapaot

* Rename EnableWinRT to UWPCompatible

* Fix UAP build for Console

* Fix uap condition in XML csproj

* Fix condition in XmlSerializer project

* Replace netcore50

* Remove dead #if

* Redundant console condition

* Redundant console condition2

* Trim baseline

* Revert Console baseline to pre UAP

* Fix MemoryMappedFiles uap build

* Fix S.Linq.Expressions build for UAP by temporarily disabling it

* Fix S.N.Sockets build for uap

* No plans to put SQLClient in UWP

* Fix RuntimeInformation build

* Fix MemoryMappedFiles build for Unix

* Add UWPCompatible to all netstandard versions

* Add EnablePinvokeAnalyzer to disable Pinvoke checking entirely for some reason

* Remove dead System.Xml.XmlSerializer.Tests.settings.targets

* Fix interop services build

* Remove last uap/uapaot define in Xml tests

* PInvoke check doc

* Fix PInvoke casing

* PInvoke file is case sensitive

* Remove unnecessary references to uapaot from projects that don't have uapaot configs

* Remove unnecessary uapaot from S.R.I.RI

* Replace UWPCompatible for TargetGroup in csproj conditions

* Reverse FileSystem edit as not ready to build for UWP


Commit migrated from https://github.com/dotnet/corefx/commit/b1865ea0847a7a86baefe8378b772ecf0b785681
2017-03-09 21:08:39 -08:00
Lakshmi Priya Sekar 0596702dbf Merge pull request dotnet/corefx#16631 from Priya91/criticalfinalizer
Remove check for safewinhttphandles to depend on finalization.

Commit migrated from https://github.com/dotnet/corefx/commit/df8ee03d028279803f55f129e2f95a8ccc5acdae
2017-03-02 15:03:50 -08:00
Lakshmi Priya Sekar c04d777a45 Remove check for safewinhttphandles to depend on gc/finalization.
Commit migrated from https://github.com/dotnet/corefx/commit/a23d6a3fcf050d4e8bedabf6bfc370c1e322becb
2017-03-02 14:03:25 -08:00
Jan Kotas 7829b42fd6 Convert some uses of Marshal.SizeOf to sizeof (dotnet/corefx#16556)
sizeof has many times better performance characteristics

Commit migrated from https://github.com/dotnet/corefx/commit/52bab6669b5cdf90161fc5d1b71c3d9a0f3854eb
2017-03-01 13:03:22 -08:00
Dan Moseley 44ac2dd747 Remove dead string resources (dotnet/corefx#16284)
Commit migrated from https://github.com/dotnet/corefx/commit/6b4423f47d5048b4c1437aaefe87859b258c89b7
2017-02-18 06:01:59 -08:00
Jon Hanna aa4b36ebfa Fix several typos (dotnet/corefx#16264)
* Fix several typos

coment → comment
rangecheck → range check
testcase → test case
deffer → defer
everytime → every time
whitespaces → whitespace (whitespace is uncountable)
white space → whitespace
white spaces → whitespace
the the → the
a → a
nametest → name test
scaned → scanned
and and → and
undecision → indecision
are no whitespace → is no whitespace
Whidbey casing
Everett casing
unkown → unknown
messsage → message
mesage → message
mesasage → message
publically → publicly (publically is attested but questionable).
exceptionto → exception to
mutatable → mutable
implemention → implementation
hadnt → hadn't
couldnt → couldn't
wouldnt → wouldn't
wont → won't
isntead → instead
preocessor → processor
particural → particular
interations → iterations
enterying → entering
stoppped → stopped
stoped → stopped
verication → verification
compuatation → computation
revisisted → revisited
partioner → partitioner
lock'ed → locked
table'd → table would
hashtable'ed → hashtabled (still coining, but tabled is analogous)
intialize → initialize
calcuate → calculate
perfom → perform
performr → perform
matthing → matching
corect → correct
thorw → throw
supress → suppress
reqeust → request
mutliple → multiple
ot → to
trival → trivial
upto → up to
specfices → specifies
patttern → pattern
descrepancy → discrepancy
explict → explicit
implict → implicit
usign → using
non-sensical → nonsensical
contination → continuation
producs → products
childred → children
parametr → parameter
approriate → appropriate
insted → instead
expection → exception
successsfully → successfully
funtion → function
unqiue → unique
apparant → apparent
expception → exception
conatined → contained
apssed → passed
propogate → propagate
cutoms → custom
currrent → current
curent → current
concurent → concurrent
coplted → completed
unexcepted → Unexpected (where the latter seems more appropriate)
to to → to
abd → and
refence → reference
particiant → participant
cuurrent → current
extratc → extract
cparticipant → participant
ehich → which
choosen → chosen
mske → make
alread → already
aquire → acquire
droppping → dropping
intial → initial
tru → true
aprticipant → participant
excption → exception
sempahore → semaphore
fileds → fields
threashold → threshold
duting → during
didnt → didn't
atribute → attribute
serliazation → serialization
localy → locally
channge → change
prperties → properties
attrbute → attribute
sentinal → sentinel
shoukd → should
existant → existent
commnent → comment
expeted → expected
propert → property
commnet → comment
datat → data
ther → the
mach → match
inhertiance → inheritance
convience → convenience
completley → completely
otheriwse → otherwise
actuall → actual
inefficent → inefficient
defalut → default
comparsion → comparison
charcters → characters
postion → position
aleady → already
charater → character
incosistent → inconsistent
seperate → separate
veify → verify
currentlly → currently
corect → correct
betwwen → between
omiting → omitting
readr → reader
compae → compare
allways → always
thown → thrown
with with → with
usecase → use case
avare → aware
lexem → lexeme
grammer → grammar
oposite → opposite
overrided → overridden
everithig → everything
chages → changes
memeber → member
proerties → properties
identifer → identifier
doesnot → does not
deriaved → derived
varialble → variable

* defered -> deferred

* Revert changes within clrcompression.

* Revert underreach → under-reach

* Fix casing broken while fixing spelling.

* Use type name instead of "Diagnostic sources"


Commit migrated from https://github.com/dotnet/corefx/commit/f0ccd9742065ee2aa296448fe3dd38ef6ff77af9
2017-02-17 10:31:00 -08:00
Eric StJohn 1a40c1b651 Merge pull request dotnet/corefx#16191 from ericstj/packages
Re-enable packages for BuildAllConfigurations

Commit migrated from https://github.com/dotnet/corefx/commit/9d1d63fb791e80399b008bc7ed0801fbb49c6e0b
2017-02-16 17:44:52 -05:00
Wes Haggard eb1f0e0530 Remove all .builds files under pkg/ref/src/tests library folders
Commit migrated from https://github.com/dotnet/corefx/commit/b60cbe5a2edb5ef3b88a7738507822d13d125d62
2017-02-15 16:32:03 -08:00
Stephen Toub 83f241c5c2 Audit all corefx Streams with Read/WriteAsync overrides (dotnet/corefx#16134)
* Audit all corefx Streams with Read/WriteAsync overrides

Any that have overrides of these that do something real (e.g. not just throw) also need overrides of Begin/EndRead/Write.


Commit migrated from https://github.com/dotnet/corefx/commit/e9ecf74d845476540f40fa8fdc62c53ebf048519
2017-02-14 17:03:16 -08:00
Eric St. John ba03538d7c Make pkgprojs reference *proj rather than builds
Commit migrated from https://github.com/dotnet/corefx/commit/0ede35ef512ac16b5dabe8c6b7b3d7d54c1c0ddb
2017-02-14 09:52:02 -08:00
Eric St. John cc939555ea Remove pkg .builds files
Commit migrated from https://github.com/dotnet/corefx/commit/361a62675ad474ac7a6c593becbc35f2cf48e6a3
2017-02-14 09:52:01 -08:00
Eric Mellino 4c4cf5d129 Merge pull request dotnet/corefx#16020 from dennisdietrich/Unchecked-Part5
Marking code as unchecked (pt 5)

Commit migrated from https://github.com/dotnet/corefx/commit/f462fa1e1f9dc3b7d297c856e8585ee2c4e2a2fc
2017-02-10 14:15:13 -08:00
Liudmila Molkova 1be82ff62d Refactor DiagnosticSource logging (correlation part1) (dotnet/corefx#15971)
* Refactor DiagnosticSource logging, prepare for Activity support


Commit migrated from https://github.com/dotnet/corefx/commit/de3b53d28d351612ffe8986d88a67e451f5295fb
2017-02-10 10:07:49 -05:00
Dennis "D.C." Dietrich a841a37279 Marking code as unchecked (pt 5)
Marking code that may intentionally lead to over or underflows with
unchecked in preparation of turning on CheckForOverflowUnderflow for
all projects (issue dotnet/corefx#3140)


Commit migrated from https://github.com/dotnet/corefx/commit/05c544cb5fe109357d61d1391b3ab4860a5b2eaf
2017-02-10 01:47:19 +01:00
Tarek Mahmoud Sayed 77cad86b1e Remove versioned configuration from test projects (dotnet/corefx#15879)
The changes onclude some other minor clean up in the test project files

Commit migrated from https://github.com/dotnet/corefx/commit/62212cca900081173fce70991c3a0b30393994a3
2017-02-06 13:52:11 -08:00
Justin Van Patten 90e7825333 Avoid unnecessary branches when fixing non-null/empty arrays (dotnet/corefx#15597)
* Avoid unnecessary branches when fixing non-null/empty arrays

* Address PR Feedback


Commit migrated from https://github.com/dotnet/corefx/commit/bfac45af5dddcbd70b6935fcf92b4b8755f3cd1c
2017-02-04 16:29:55 -05:00
Wes Haggard f2fd0ea78a Update Solution files to use windows path slashes.
Commit migrated from https://github.com/dotnet/corefx/commit/f8ba7c412d06d8e4d4e6278502d4dd771a0f10bb
2017-02-03 16:31:48 -08:00