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

veb.StaticHandler and ctx.file() don't function properly on termux #23596

Open
heyimtcn opened this issue Jan 27, 2025 · 1 comment
Open

veb.StaticHandler and ctx.file() don't function properly on termux #23596

heyimtcn opened this issue Jan 27, 2025 · 1 comment
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@heyimtcn
Copy link
Contributor

heyimtcn commented Jan 27, 2025

Describe the bug

if you host a static file or return ctx.file() on a veb server and try to access it, the request gets stuck loading forever

Reproduction Steps

import veb

pub struct App {}

pub struct Context {
	veb.Context
}

pub fn (_ &App) index(mut ctx Context) veb.Result {
	return ctx.file('file.txt')
}

fn main() {
	mut app := &App{}
	veb.run[App,Context](mut app,8080)
}
import veb

pub struct App {
	veb.StaticHandler
}

pub struct Context {
	veb.Context
}

fn main() {
	mut app := &App{}
	app.serve_static('/','file.txt')!
	veb.run[App,Context](mut app,8080)
}

run both then attempt to open localhost:8080

Expected Behavior

the file to show

Current Behavior

endless loading

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.9 3343fb7

Environment details (OS name and version, etc.)

vdoctor.v won't compile

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.

@heyimtcn heyimtcn added the Bug This tag is applied to issues which reports bugs. label Jan 27, 2025
Copy link

Connected to Huly®: V_0.6-22022

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

No branches or pull requests

1 participant