j commited on
Commit
07f6acb
·
1 Parent(s): beca3bb

modified ReaSpeechAPI.lua

Browse files
reascripts/ReaSpeech/source/ReaSpeechAPI.lua CHANGED
@@ -197,7 +197,7 @@ function ReaSpeechAPI.http_status_and_body(response)
197
  local headers, content = ReaSpeechAPI._split_curl_response(response)
198
  local last_status_line = headers[#headers] and headers[#headers][1] or ''
199
 
200
- local status = last_status_line:match("HTTP/([12]%.?%d?) (200)")
201
  if not status then
202
  return -1, 'Status not found in headers'
203
  end
 
197
  local headers, content = ReaSpeechAPI._split_curl_response(response)
198
  local last_status_line = headers[#headers] and headers[#headers][1] or ''
199
 
200
+ local status = last_status_line:match("^HTTP/%d%.%d%s+(%d+)")
201
  if not status then
202
  return -1, 'Status not found in headers'
203
  end