Skip to content

Update ITlsHandshakeFeature.HostName API + misc. improvements in HttpSys calls #48788

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

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

karimsalem1
Copy link
Contributor

@karimsalem1 karimsalem1 commented Jun 13, 2023

Update ITlsHandshakeFeature.HostName API + misc. improvements in HttpSys calls

Summary of the changes (Less than 80 chars)

Updating the ITlsHandshakeFeature.HostName API as discussed in #34525 and miscellaneous improvements in HttpQueryRequestProperty calls + cleanup

Description

The PR does the following changes:

  • Updates the ITlsHandshakeFeature.HostName property to be non-nullable and updates all references accordingly.
  • Changes HTTPAPI HttpQueryRequestProperty method definition to have an invoker similar to HttpSetRequestPropertyInvoker. This API might not be present on older OS's so it'll be guarded by an Invoker and null check to ensure backwards compatibility.
  • Updates the HttpQueryRequestProperty parameters qualifierSize, outputSize and bytesReturned to be uint instead of ulong. Based on the HttpSys API (shown below), these are ULONG which are 32 bits in Windows. Also updated the propertyInfoSetSize parameter in HttpDelegateRequestEx for the same reason.
HttpQueryRequestProperty(
    _In_ HANDLE RequestQueueHandle,
    _In_ HTTP_OPAQUE_ID Id,
    _In_ HTTP_REQUEST_PROPERTY PropertyId,
    _In_reads_bytes_opt_(QualifierSize) PVOID Qualifier,
    _In_ ULONG QualifierSize,
    _Out_writes_bytes_to_opt_(OutputBufferSize, *BytesReturned) PVOID Output,
    _In_ ULONG OutputBufferSize,
    _Out_opt_ PULONG BytesReturned,
    _In_ LPOVERLAPPED Overlapped
    );
  • Cleans up extra namespaces introduced in previous PR and changes HTTP_REQUEST_PROPERTY_SNI_HOST_MAX_LENGTH to private

Link to previous PR: #48572

@ghost ghost added area-runtime community-contribution Indicates that the PR has been added by a community member labels Jun 13, 2023
@ghost
Copy link

ghost commented Jun 13, 2023

Thanks for your PR, @karimsalem1. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@Tratcher Tratcher self-assigned this Jun 13, 2023
@Tratcher Tratcher enabled auto-merge (squash) June 13, 2023 23:20
@Tratcher Tratcher removed the community-contribution Indicates that the PR has been added by a community member label Jun 13, 2023
@karimsalem1
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 48788 in repo dotnet/aspnetcore

@Tratcher Tratcher merged commit d734541 into dotnet:main Jun 14, 2023
@ghost ghost added this to the 8.0-preview6 milestone Jun 14, 2023
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants