1
  1. Library : chilkat-9.5.0.84-x86-vc9 (Latest Version)

    (Actually tested older versions also have the same issue)

  2. Problem :

    Url string has a comma ',' character eg.

    hxxp://show.kanxxxx.com/ncsxxxx/sd/1611309600000,1800000.m3u8?_upt=c5e8aa9a1611395849

    Use Methods DownloadBd & SynchronousRequest (I believe other methods as well) and capture traffics via Fiddler, obtains HTTP/1.1 403 Forbidden response. It is found that the comma ',' is encoded as %2C.

    Using Fiddler composer to send the same url, it is found that the comma is not encoded, it is sent out as it is. The obtained response is valid successful !

  3. Is it possible to manually turn off the auto URL encoding ? or I did not include other methods or properties to turn off the encoding ?

  4. Is it a bug ?

Dragon
  • 13
  • 2

2 Answers2

1

Chilkat has been updated to avoid URL encoding the comma character in the path. I can provide a new v9.5.0.85 pre-release build for VC9 if you email support@chilkatsoft.com. Otherwise, the .85 version will be officially released at the end of this month (in about a week).

Chilkat Software
  • 1,405
  • 1
  • 9
  • 8
  • Please refer to above suggestion. – Dragon Jan 24 '21 at 02:05
  • Tested new v9.5.0.85, method SynchronousRequest is not working and verified that the comma is still encoded as %2C. Testing using methods DownloadBd & DownloadSb, the comma is sent out as it is. Hence, the returned response is valid and successful. – Dragon Jan 29 '21 at 12:26
  • Tested again using the latest Feb release : 9.5.0.86-x86-vc9, SynchronousRequest method still encode the comma as "%2C" and send out. No such issue with methods DownloadBd & DownloadSb. – Dragon Feb 13 '21 at 00:53
0

Suggestion :

I foresee that in the future, there may be other servers which require the comma to be encoded as %2C. Hence, is it possible to enable/disable, or set the encoding of specific character manually.

ie. something like strtok function where you set the required separators. eg.

char Sep[] = ",;\r\n"; 

while (xxx) 
{
   szTok = strtok(szData,Sep);
   xxxx;
   strTok = strtok(NULL,Sep);
} 

Proposal :

CkHttp Http;
char Enc[]="+,";

Http.xxxxx(Enc,bEnable);
Http.DownloadBd(xxxxx);

Just a suggestion for your consideration.

Dragon
  • 13
  • 2