ICEpush
  1. ICEpush
  2. PUSH-317

Use request parameters for ICEpush

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.BETA
    • Fix Version/s: 4.0
    • Component/s: JavaScript Client
    • Labels:
      None
    • Environment:
      ICEpush, nginx

      Description

      ICEpush makes use of a number of HTTP headers. These values should be passed as parameters in the body of the HTTP request:

      ice.push.heartbeatTimestamp: 1401307088848
      ice.notifyBack: apns:f7353
      ice.push.browser: 1hvr1j5ar
      ice.push.sequence: 130
      ice.parkids: true
      ice.push.window: fe4f7

      (In some cases these are passed as body parameters, but the use of headers should be avoided.)

        Activity

        Ted Goddard created issue -
        Ted Goddard made changes -
        Field Original Value New Value
        Assignee Mircea Toma [ mircea.toma ]
        Ted Goddard made changes -
        Workaround Description Use

            proxy_pass_request_headers on;

        http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass_request_headers

        http://stackoverflow.com/questions/19751313/forward-request-headers-from-nginx-proxy-server

        Example configuration for nginx:

        location / {
            proxy_pass http://mysite.com;
            proxy_set_header Host http://mysite.com;
            proxy_set_header HTTP_Country-Code $geoip_country_code;
            proxy_pass_request_headers on;
        }
        Workaround Exists Yes [ 10007 ]
        Ted Goddard made changes -
        Fix Version/s 4.0.BETA [ 10971 ]
        Ted Goddard made changes -
        Workaround Description Use

            proxy_pass_request_headers on;

        http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass_request_headers

        http://stackoverflow.com/questions/19751313/forward-request-headers-from-nginx-proxy-server

        Example configuration for nginx:

        location / {
            proxy_pass http://mysite.com;
            proxy_set_header Host http://mysite.com;
            proxy_set_header HTTP_Country-Code $geoip_country_code;
            proxy_pass_request_headers on;
        }
        Use in the http section:

            ignore_invalid_headers off;

        http://wiki.nginx.org/HttpCoreModule#ignore_invalid_headers

            proxy_pass_request_headers on;

        http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass_request_headers

        http://stackoverflow.com/questions/19751313/forward-request-headers-from-nginx-proxy-server

        Example configuration for nginx:

        location / {
            proxy_pass http://mysite.com;
            proxy_set_header Host http://mysite.com;
            proxy_set_header HTTP_Country-Code $geoip_country_code;
            proxy_pass_request_headers on;
        }
        Hide
        Ted Goddard added a comment -

        Additional configuration for nginx was required since it rejects the "invalid" . separator in the ICEpush headers. This can be addressed by adding as described in the workaround.

        ignore_invalid_headers off;

        According to RFC 2068 an HTTP header name is a "token" http://tools.ietf.org/html/rfc2068

        token = 1*<any CHAR except CTLs or tspecials>

        tspecials = "(" | ")" | "<" | ">" | "@"

        "," ";" ":" "\" <">
        "/" "[" | "]" "?" "="
        " {" | "}

        "

        SP HT

        which allows the "." character, but it is apparently uncommon enough to be rejected by nginx.

        Show
        Ted Goddard added a comment - Additional configuration for nginx was required since it rejects the "invalid" . separator in the ICEpush headers. This can be addressed by adding as described in the workaround. ignore_invalid_headers off; According to RFC 2068 an HTTP header name is a "token" http://tools.ietf.org/html/rfc2068 token = 1*<any CHAR except CTLs or tspecials> tspecials = "(" | ")" | "<" | ">" | "@" "," ";" ":" "\" <"> "/" " [" | "] " "?" "=" " {" | "} " SP HT which allows the "." character, but it is apparently uncommon enough to be rejected by nginx.
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11383 ]
        Fix Version/s 4.0.BETA [ 10971 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #41327 Wed Jun 11 15:19:51 MDT 2014 mircea.toma PUSH-317 Modified bridge and server side servlets to use request parameters instead of request headers.
        Files Changed
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/Browser.java
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/servlet/ServletPushRequest.java
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/javascript/application.js
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/javascript/connection.async.js
        Hide
        Mircea Toma added a comment -

        Modified bridge and server side servlets to use request parameters instead of request headers.

        Show
        Mircea Toma added a comment - Modified bridge and server side servlets to use request parameters instead of request headers.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: