microsoft / microsoft/win32metadata

HTTP_VERSION (string constant) is defined wrongly.

Open
#2,029 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.5k
Forks
149
Avg merge
5d 16h
Merged PRs (30d)
4

Description

HTTP_VERSION is defined in Windows.Win32.Networking.HttpServer.Apis.

```
.field public static literal string HTTP_VERSION = "HTTP/1.0"
.custom instance void [Windows.Win32.winmd]Windows.Win32.Foundation.Metadata.DocumentationAttribute::.ctor(string) = (
01 00 47 68 74 74 70 73 3a 2f 2f 6c 65 61 72 6e
2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d 2f 77
69 6e 64 6f 77 73 2f 77 69 6e 33 32 2f 61 70 69
2f 68 74 74 70 2f 6e 73 2d 68 74 74 70 2d 68 74
74 70 5f 76 65 72 73 69 6f 6e 00 00
)
```

(DocumentationAttribute point to [HTTP_VERSION structure (http.h)](https://learn.microsoft.com/windows/win32/api/http/ns-http-http_version)).

I think it should be alias of HTTP_VERSIONA or HTTP_VERSIONW defined in Windows.Win32.Networking.WinInet.Apis

```
.field public static literal string HTTP_VERSIONA = "HTTP/1.0"
.custom instance void [Windows.Win32.winmd]Windows.Win32.Foundation.Metadata.NativeEncodingAttribute::.ctor(string) = (
01 00 04 61 6e 73 69 00 00
)

.field public static literal string HTTP_VERSIONW = "HTTP/1.0"
```

These are defined in wininet.h.

```c
#define HTTP_VERSIONA "HTTP/1.0"
#define HTTP_VERSIONW L"HTTP/1.0"

#ifdef UNICODE
#define HTTP_VERSION HTTP_VERSIONW
#else
#define HTTP_VERSION HTTP_VERSIONA
#endif
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the metadata inputs or generation entry point for Windows.Win32.Networking.HttpServer.Apis and Windows.Win32.Networking.WinInet.Apis, then compare them with http.h and wininet.h. The issue is done when the generated HTTP_VERSION declaration reflects the appropriate HTTP_VERSIONA or HTTP_VERSIONW alias and its documentation and encoding metadata are correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.