summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał M. Sapka <michal@sapka.me>2023-02-01 18:17:26 +0100
committerMichał M. Sapka <michal@sapka.me>2023-02-01 18:17:26 +0100
commit0180ebc66745ce73cc4810a6b19922c7eb1a55af (patch)
tree8963afa48282645e13d679fc159d5f2f1abe5d86
parentf9ccc49e831c681db4aefa763b9eb51f15443785 (diff)
fix: typo
l---------content/2023/.#http-headers-in-rails-hyphens-and-underscores.md1
-rw-r--r--content/2023/http-headers-in-rails-hyphens-and-underscores.md2
2 files changed, 2 insertions, 1 deletions
diff --git a/content/2023/.#http-headers-in-rails-hyphens-and-underscores.md b/content/2023/.#http-headers-in-rails-hyphens-and-underscores.md
new file mode 120000
index 0000000..46853c3
--- /dev/null
+++ b/content/2023/.#http-headers-in-rails-hyphens-and-underscores.md
@@ -0,0 +1 @@
+msapka@RN90Y7RDHT.772 \ No newline at end of file
diff --git a/content/2023/http-headers-in-rails-hyphens-and-underscores.md b/content/2023/http-headers-in-rails-hyphens-and-underscores.md
index 453e9eb..7e96b88 100644
--- a/content/2023/http-headers-in-rails-hyphens-and-underscores.md
+++ b/content/2023/http-headers-in-rails-hyphens-and-underscores.md
@@ -9,7 +9,7 @@ tags: ['rack', 'ruby-on-rails', 'headers', 'magic']
---
Everyone's favorite magician, Ruby on Rails, does it again.
-As it [Rack modifies incoming requests' headers](https://github.com/rails/rails/blob/aaf7bed00338c3a97dbb12b3c82a30ae34e67876/actionpack/lib/action_dispatch/http/headers.rb#L12) and normalizes they keys. So, every time the client/proxy sends something cool like `A-HEADER`, the key is modified, so some characters become underscore. Therefore in Rails code need to access `A_HEADER`, and if I had known that yesterday, my day would be much more pleasant.
+As it turns out, [Rack modifies incoming requests' headers](https://github.com/rails/rails/blob/aaf7bed00338c3a97dbb12b3c82a30ae34e67876/actionpack/lib/action_dispatch/http/headers.rb#L12) and normalizes they keys. So, every time the client/proxy sends something cool like `A-HEADER`, the key is modified, so some characters become underscore. Therefore in Rails code need to access `A_HEADER`, and if I had known that yesterday, my day would be much more pleasant.
> Also note that when headers are mapped to CGI-like variables by the Rack
>