Icon View Incident Report

Serious Serious
Reported By: Mark Brooks
Reported On: 10/2/2015
For: Version 2.01 Build 2
# 4257 TServerRequest Component Not Trimming Leading Spaces from Request Header Values

Just a quick one to potentially be wary of. I think I have discovered an issue with EWB apps that utilise HTTP headers when running in Safari or Chrome on iOS 9 and in Safari 9 on Yosemite or El Capitan.

My code generally sets HTTP headers using code like this:

- RequestHeaders.Add('Content-Type: application/json')

You will note that there is a space between the header name element and the corresponding value element within the header string.

Deeper inside EWB this results in a call to the SetRequestHeader method of the HTTP object. At this stage EWB will have parsed out the name and value elements. The latter will unfortunately have a space in, so in this case we will see the following call:

- SetRequestHeader('Content-Type',' application/json')

Again, you will see that the space remains in front of the value element. I think this is because the EWB parsing is handled by the standard TStringList name-value functionality.

Whilst this has never been an issue before, it turns out that the SetRequestHeader call in IOS 9 and Safari 9 (and I suspect an upcoming version of Chrome) will throw an exception (Syntax Error DOM Exception 12) because of the leading space.


Resolution Resolution
Fixed Problem on 10/3/2015 in version 2.02 build 1


Products Affected Products Affected
Elevate Web Builder
Elevate Web Builder Trial

Image