Skip to content

Curl command when header name ends in "-Id" #218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
joshuaswilcox opened this issue Jul 1, 2015 · 1 comment
Open

Curl command when header name ends in "-Id" #218

joshuaswilcox opened this issue Jul 1, 2015 · 1 comment

Comments

@joshuaswilcox
Copy link

There was a recent fix in 4.4.0 that fixed the header list for this issues, but its still a problem for the curl command. I have a proposed fix of something like

def format_header(header)
  orig_header = header
  formatted_header = header.gsub(/^HTTP_/, '').titleize.split.join("-")
  formatted_header.concat('-Id') if orig_header.scan(/[-_]Id\Z/i).any?
  formatted_header
end
@ghost
Copy link

ghost commented Jul 22, 2015

This worked for me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant