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

vibed/web-server.md code example build error. #355

Open
VGeo opened this issue Aug 30, 2021 · 1 comment · May be fixed by #358
Open

vibed/web-server.md code example build error. #355

VGeo opened this issue Aug 30, 2021 · 1 comment · May be fixed by #358

Comments

@VGeo
Copy link

VGeo commented Aug 30, 2021

The WEB Server example building fails with

source/app.d(51,9): Error: invalid `foreach` aggregate `req.headers`, define `opApply()`, range primitives, or use `.tupleof`

DMD64 D Compiler v2.097.2, vibe.d 0.9.3

Could be fixed with byKeyValue() method:

foreach(key, value; req.headers.byKeyValue()) {
@Hume2
Copy link

Hume2 commented Aug 10, 2022

It happens with DMD 2.100.0 also. Additionally, it requires to cast the variable username_ to string using cast(string)username_.

Hume2 added a commit to Hume2/dte that referenced this issue Aug 10, 2022
@Hume2 Hume2 linked a pull request Aug 10, 2022 that will close this issue
kubo39 added a commit to dlang-tour/japanese that referenced this issue Apr 25, 2023
kubo39 added a commit to dlang-tour/japanese that referenced this issue Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants