File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -415,6 +415,7 @@ pub fn run_at[T](global_app &T, params RunParams) ! {
415
415
}
416
416
host := if params.host == '' { 'localhost' } else { params.host }
417
417
println ('[Vweb] Running app on http://${host} :${params.port} /' )
418
+ flush_stdout ()
418
419
for {
419
420
// Create a new app object for each connection, copy global data like db connections
420
421
mut request_app := & T{}
@@ -607,8 +608,8 @@ fn route_matches(url_words []string, route_words []string) ?[]string {
607
608
[manualfree ]
608
609
fn serve_if_static [T](mut app T, url urllib.URL) bool {
609
610
// TODO: handle url parameters properly - for now, ignore them
610
- static_file := app.static_files[url.path]
611
- mime_type := app.static_mime_types[url.path]
611
+ static_file := app.static_files[url.path] or { return false }
612
+ mime_type := app.static_mime_types[url.path] or { return false }
612
613
if static_file == '' || mime_type == '' {
613
614
return false
614
615
}
@@ -706,7 +707,7 @@ pub fn (ctx &Context) ip() string {
706
707
707
708
// Set s to the form error
708
709
pub fn (mut ctx Context) error (s string ) {
709
- println ('vweb error: ${s} ' )
710
+ eprintln ('vweb error: ${s} ' )
710
711
ctx.form_error = s
711
712
}
712
713
You can’t perform that action at this time.
0 commit comments