libideviceactivation icon indicating copy to clipboard operation
libideviceactivation copied to clipboard

idevice_activation_header_callback function fails to parse well-formed HTTP headers

Open jarosz opened this issue 5 years ago • 0 comments

Hi.

With ideviceactivation.exe from https://appletech752.com/downloads.html binaries I've got an error "Failed to send request or retrieve response."

Same error with ideviceactivation.exe from https://github.com/libimobiledevice-win32/imobiledevice-net/releases/tag/v1.3.6

I've compiled libimobiledevice myself with https://github.com/libimobiledevice-win32/libimobiledevice-vs to debug this application. I've found out, that Content-Type header wasn't parsed properly.

Steps to reproduce:

  1. Serve an URL with header different from "Content-Type: text/html", for example 'Content-type: text/html; charset=UTF-8'
  2. Run ideviceactivation -s URL -d and stop debugging at activation.c:522

Expected result: response->content_type should be set to IDEVICE_ACTIVATION_CONTENT_TYPE_HTML

Actual result: response->content_type set to IDEVICE_ACTIVATION_E_UNKNOWN_CONTENT_TYPE.

I've created a patch to fix this issue, it works for me, but I tried it only on Windows 64-bit.

jarosz avatar Dec 07 '20 01:12 jarosz