FAQ
When I call writer.Header().Set("ETag", fmt.Sprintf("\"%s\"", etag))
My web browser receives "E*t*ag" instead of "E*T*ag".

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Islan Dberry at Jun 25, 2013 at 2:48 pm
    This should not be a problem because http header names are case insensitive.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Kyle Lemons at Jun 25, 2013 at 8:09 pm

    On Tue, Jun 25, 2013 at 7:33 AM, Pierre Durand wrote:

    When I call writer.Header().Set("ETag", fmt.Sprintf("\"%s\"", etag))

    (minor note: fmt.Sprintf("%q", etag) will do the quoting for you)

    My web browser receives "E*t*ag" instead of "E*T*ag".

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Phil Kulak at Jun 26, 2013 at 12:23 am
    From the docs:

    HTTP defines that header names are case-insensitive.The request parser implements this by canonicalizing thename, making the first character and any charactersfollowing a hyphen uppercase and the rest lowercase.

    http://golang.org/pkg/net/http/#Request
    On Tuesday, June 25, 2013 7:33:09 AM UTC-7, Pierre Durand wrote:

    When I call writer.Header().Set("ETag", fmt.Sprintf("\"%s\"", etag))
    My web browser receives "E*t*ag" instead of "E*T*ag".
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Dave Cheney at Jun 26, 2013 at 6:01 am
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2

    "Field names are case-insensitive."
    On Wed, Jun 26, 2013 at 8:47 AM, Phil Kulak wrote:
    From the docs:

    HTTP defines that header names are case-insensitive.
    The request parser implements this by canonicalizing the
    name, making the first character and any characters
    following a hyphen uppercase and the rest lowercase.

    http://golang.org/pkg/net/http/#Request
    On Tuesday, June 25, 2013 7:33:09 AM UTC-7, Pierre Durand wrote:

    When I call writer.Header().Set("ETag", fmt.Sprintf("\"%s\"", etag))
    My web browser receives "Etag" instead of "ETag".
    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Pierre Durand at Jun 26, 2013 at 7:37 am
    thank you! I didn't know that...

    Le mercredi 26 juin 2013 08:01:01 UTC+2, Dave Cheney a écrit :
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2

    "Field names are case-insensitive."
    On Wed, Jun 26, 2013 at 8:47 AM, Phil Kulak wrote:
    From the docs:

    HTTP defines that header names are case-insensitive.
    The request parser implements this by canonicalizing the
    name, making the first character and any characters
    following a hyphen uppercase and the rest lowercase.

    http://golang.org/pkg/net/http/#Request
    On Tuesday, June 25, 2013 7:33:09 AM UTC-7, Pierre Durand wrote:

    When I call writer.Header().Set("ETag", fmt.Sprintf("\"%s\"", etag))
    My web browser receives "Etag" instead of "ETag".
    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJun 25, '13 at 2:33p
activeJun 26, '13 at 7:37a
posts6
users5
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase