DEV Community

Discussion on: When is a quick and dirty hack justified?

Collapse
 
viguza profile image
Victor Guzman

Just today I had to come with a dirty hack! We are using an API that for some reason has case sensitive http request headers, and ruby applies some case changes to headers when sending requests.

And since we don’t have control over that API, we had to create a string subclass and override the case methods to do nothing and be able to pass request headers in the expected case.

It was a nightmare to find the issue btw! But it was a good lesson too!