Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

asp:RadioButtonList 'RepeatLayout' being ignored through CDN

I have a WebControl on my site that has an asp:RadioButtonList on it.

I have the RepeatLayout property set to 'Table'.

When I view the site normally, it renders correctly (as a table).

We have then setup a CDN, that the entire site passes through, but only images, JS and CSS files are retrieved from the CDN, and the rest of the site passes through and hits our servers (so aspx requests are still coming off a server that I have direct access to).

While in testing, I have setup my hosts file to point to the CDN address.

Everything else seems fine, yet the RadioButtonList is rendering as input and label tags, separated by <br />'s. This is how it should render if I had RepeatLayout set to "Flow".

I can even edit the text in the ListItems in the control, and see that they update, so it's definitely hitting my server.

Does anyone have an idea why my tests using the CDN are returning the incorrect markup, only for RadioButtonLists?

like image 874
Sean Holmesby Avatar asked Nov 12 '22 13:11

Sean Holmesby


1 Answers

We've finally found the issue.

Akaimai was sending it's own user agent, Akamai-Edge, through to our servers in the request for the page.

In doing so, our servers were returning different markup based on the user agent. (Our site runs off the CMS Sitecore, which has user-agent dependent markup.)

We managed to fix this by changing the Akamai config so that the normal user agent from the website visitor is passed through to our servers in the request, instead of the Akamai one.

I suspect that this is also a bug in Sitecore (not returning the default markup for an unknown user-agent).

like image 121
Sean Holmesby Avatar answered Nov 15 '22 13:11

Sean Holmesby