@@ -59,8 +59,8 @@ function parsepostdata(req, data_dict, multipart_boundary)
59
59
Lbound = length (boundary)
60
60
Ldata = length (data)
61
61
62
- boundbytes = convert (Vector{UInt8}, boundary)
63
- boundbytes_end = convert (Vector{UInt8}, boundary_end)
62
+ boundbytes = convert (Vector{UInt8}, codeunits ( boundary) )
63
+ boundbytes_end = convert (Vector{UInt8}, codeunits ( boundary_end) )
64
64
65
65
boundloc = searcharr (data, boundbytes, 1 )
66
66
endpos = startpos = last (boundloc) + 1
@@ -162,27 +162,27 @@ function http_handler(apis::Channel{APIInvoker{T,F}}, preproc::Function, req::HT
162
162
res = HTTP. Response (500 )
163
163
164
164
try
165
- comps = split (getfield (req, :target ), ' ?' , limit= 2 , keep = false )
165
+ comps = Compat . split (getfield (req, :target ), ' ?' , limit= 2 , keepempty = false )
166
166
if isempty (comps)
167
167
res = HTTP. Response (404 )
168
168
else
169
169
res = preproc (req)
170
170
if res === nothing
171
- comps = split (getfield (req, :target ), ' ?' , limit= 2 , keep = false )
172
- path = shift ! (comps)
171
+ comps = Compat . split (getfield (req, :target ), ' ?' , limit= 2 , keepempty = false )
172
+ path = popfirst ! (comps)
173
173
data_dict = isempty (comps) ? Dict {String,String} () : HTTP. queryparams (comps[1 ])
174
174
multipart_boundary = get_multipart_form_boundary (req)
175
175
if multipart_boundary === nothing
176
176
data_dict = parsepostdata (req, data_dict)
177
177
else
178
178
data_dict = parsepostdata (req, data_dict, multipart_boundary)
179
179
end
180
- args = map (String, split (path, ' /' , keep = false ))
180
+ args = map (String, Compat . split (path, ' /' , keepempty = false ))
181
181
182
182
if isempty (args) || ! isvalidcmd (args[1 ])
183
183
res = HTTP. Response (404 )
184
184
else
185
- cmd = shift ! (args)
185
+ cmd = popfirst ! (args)
186
186
@static if isdefined (Base, Symbol (" @info" ))
187
187
@info (" waiting for a handler" )
188
188
else
0 commit comments