Commit 8184512b authored by Bat's avatar Bat
Browse files

Merge branch 'master' into 'master'

fix #57



See merge request !14
parents 6014b1c5 34e89ff0
Pipeline #9427 passed with stage
in 4 minutes and 5 seconds
......@@ -118,6 +118,11 @@ namespace Valse {
line = line.replace ("\r", "");
line = line.replace ("\n", "");
if (line == "--" + boundary + "--") {
if (name != "" && val != "") {
this.form_data [name] = val;
}
name = "";
val = "";
break;
}
......@@ -137,7 +142,7 @@ namespace Valse {
}
}
Regex name_re = new Regex ("Content-Disposition: form-data; name=\"(?<name>.*)\"");
Regex name_re = new Regex ("^Content-Disposition: form-data; name=\"(?<name>.*)\"");
MatchInfo name_info;
if (name_re.match (line, 0, out name_info)) {
name = name_info.fetch_named ("name");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment