Skip to content
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

Uninitialized http header #20118

Closed
MCausc78 opened this issue Dec 7, 2023 · 0 comments · Fixed by #20131
Closed

Uninitialized http header #20118

MCausc78 opened this issue Dec 7, 2023 · 0 comments · Fixed by #20131
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@MCausc78
Copy link
Contributor

MCausc78 commented Dec 7, 2023

Describe the bug

<title>

Reproduction Steps

import net.http

fn main() {
    mut r := http.new_request(.get, '', '')
    r.header.set(.authorization, 'foo')
    r.header.delete(.authorization)
}

Expected Behavior

Successful execution and empty output

Current Behavior

PS D:\Games\Proekti\V\interactions> v run test.v
V panic: string.eq(): nil string
v hash: 64e8139
C:/Users/mclr/AppData/Local/Temp/v_0/test.2441856544024933291.tmp.c:11881: at _v_panic: Backtrace
C:/Users/mclr/AppData/Local/Temp/v_0/test.2441856544024933291.tmp.c:15170: by string__eq
C:/Users/mclr/AppData/Local/Temp/v_0/test.2441856544024933291.tmp.c:32090: by net__http__Header_delete_custom
C:/Users/mclr/AppData/Local/Temp/v_0/test.2441856544024933291.tmp.c:32084: by net__http__Header_delete
C:/Users/mclr/AppData/Local/Temp/v_0/test.2441856544024933291.tmp.c:34506: by main__main
C:/Users/mclr/AppData/Local/Temp/v_0/test.2441856544024933291.tmp.c:34851: by wmain
00784ce0 : by ???
00784e43 : by ???

Possible Solution

header: Header{}

Additional Information/Context

No response

V version

V 0.4.3 64e8139

Environment details (OS name and version, etc.)

V full version: V 0.4.3 140c838.64e8139
OS: windows, Microsoft Windows 11 Pro v22000 64-bit
Processor: 12 cpus, 64bit, little endian, 

getwd: D:\Games\Proekti\V\interactions
vexe: D:\Games\Proekti\V\v\v.exe
vexe mtime: 2023-12-07 20:59:07

vroot: OK, value: D:\Games\Proekti\V\v
VMODULES: OK, value: C:\Users\mclr\.vmodules
VTMP: OK, value: C:\Users\mclr\AppData\Local\Temp\v_0

Git version: git version 2.37.0.windows.1
Git vroot status: weekly.2023.45.1-224-g64e8139d
.git/config present: true

CC version:
thirdparty/tcc status: thirdparty-windows-amd64 e90c2620

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@MCausc78 MCausc78 added the Bug This tag is applied to issues which reports bugs. label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant