Suggestion: Remove "X-" prefix from headers

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
jetforme
 
Posts: 107
Joined: Mon Jul 15, 2013 6:26 pm

Suggestion: Remove "X-" prefix from headers

Post by jetforme »

It's generally discouraged, these days, from creating HTTP resources with headers that have the X- prefix. See https://tools.ietf.org/html/rfc6648. It's not a huge deal, just thought I'd mention it.

User avatar
jwcooper
 
Posts: 1004
Joined: Tue May 01, 2012 9:08 pm

Re: Suggestion: Remove "X-" prefix from headers

Post by jwcooper »

Hi, thanks for the feedback.

I'm generally in agreement with the following stack overflow post on the use of custom headers: https://stackoverflow.com/a/19640336. It explains in a fairly elegant way why the x- prefix still makes sense for custom vendor specific headers that would never be considered for standardization.

That being said, we'll continue to follow this and be open to dropping the x- prefix in the future.

User avatar
jetforme
 
Posts: 107
Joined: Mon Jul 15, 2013 6:26 pm

Re: Suggestion: Remove "X-" prefix from headers

Post by jetforme »

That's fine. I don't feel that strongly about it. It's just that many times (probably not in this case), the X- name becomes the de facto name, and stays that way forever. X- alone isn't really enough to prevent namespace pollution. You end up with a bunch of meaningless X- prefixes.

But of all the improvement the service needs, this is probably the least important.

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”