omnibrain 15 Posted February 25 I make heavy use of 'TSslHttpRest' for all kinds of requests, but with the recent update to ICS 9.4 (I skipped 9.3) some requests to plain text endpoints fail. I get 200 OK, but the responseraw is empty. I think the culprit is this: { V9.3 is a MIME type texual or printable text } function IcsMimeIsTextual(const MimeType: String): Boolean; begin Result := (Pos ('text/', MimeType) = 1) or (Pos ('json', MimeType) > 0) or (Pos ('javascript', MimeType) > 0) or (Pos ('xml', MimeType) > 0); end; I have to request some servers that answer with content-type 'text' instead of 'text/plain', so this function doesn't work for me. I'm not sure if you consider this a bug, because I think just 'text' is no "official" mime-type, but on the other hand, I have no control over the servers I have to query, so I would appreciate if there was a solution besides me manually patching the ICS code. Share this post Link to post
Angus Robertson 612 Posted February 25 Strangely, that function was on my screen, I've just added some more parameter encoding and decoding functions to that unit. I've removed the / after text, it's a pretty basic function to avoid trying to convert images and files into unicode. Not sure why V9.3 changed anything, that text/ check was previously in the TriggerRequestDone2 function. Angus 1 Share this post Link to post
omnibrain 15 Posted February 25 Thanks. Yes, strange, must be a coincidence then. Perhaps something changed at a server and I only noticed just now. Share this post Link to post