bykof / cordova-plugin-webserver

A webserver plugin for cordova
Other
124 stars 49 forks source link

[bug] Headers are not presented in case of file serving #50

Closed kaganem closed 5 years ago

kaganem commented 5 years ago

If we are trying to server file, headers are not presented in response. Basic code to reproduce is:

window.webserver.sendResponse(
  request.requestId,
  {
    status: 200,
    path: <some_path>,
    headers: {
      '<some_header>': '<some_value>'
    }
  }
)

On client side we will receive file with length and correct type header (doubled sometime, but correct after all), but no at all.

Android is confirmed at the moment. Will dig in iOS soon.