Navigation

    egnite Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    1. Home
    2. KingRial
    K
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    KingRial

    @KingRial

    0
    Reputation
    2
    Posts
    519
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    KingRial Follow

    Posts made by KingRial

    • RE: QUERX TH: HTTP Push and wrong "Content-Lenght"

      @tim Thank you very much for your feedback!

      I can confirm everything work with the corrected template.

      posted in General Discussion
      K
      KingRial
    • QUERX TH: HTTP Push and wrong "Content-Lenght"

      While testing the product QUERX TH we tried to configure the "http-push" to move the informations from the field to our IoT cloud in our development environment.

      During R&D, we:
      • upgraded the QUERX firmware to latest version 4.4.18.1
      • followed the instructions to build our own template to be able to add a dynamic access token
      • uploaded it on the product
      • successfully tested the POST to our web service

      The custom template is pretty simple:

      add=/tpl/j/cloud.tpl
      
      Authorization: Bearer {{pushtab_var1}}
      Content-Type: application/json; charset=utf-8
      { # # }
      {"{{sensortab_name.0}}": {"value": "{{sensortab_value.0}}", "unit":"{{sensortab_unit.0}}"}, "{{sensortab_name.1}}": {"value": "{{sensortab_value.1}}", "unit":"{{sensortab_unit.1}}"}}
      

      The issue we faced is that the posted content, whenever we are using a custom template, has an http header which is not following the web standards.

      As you can see in the following screenshot the “Content-Length” header of the POST request is always set to the value: -2

      test.jpg

      Problem is “-2” is not a standard value for that specific header (which should be >= 0) and we should break the standards to allow the web server to accept such information.

      We tried:

      • forcing the header from template
      • using a simple “Hello World” template
      • updating firmware to Querx TH 5.0.3.1

      but without success.

      Are we doing something wrong ?
      Is this a bug ?

      Any hint is much appreciated, thanks for your support!

      posted in General Discussion
      K
      KingRial