generic http + problems with special characters ?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

generic http + problems with special characters ?

#1 Post by kr0815 » 10 May 2016, 15:15

I have to send something what has a dash - for example:

5696d760-161d-11e6-b631-dd7b9f7123f0

but the server rejects it because it´s send like:

5696d760%2d161d%2d11e6%2db631%2ddd7b9f7123f0

Any idea how to keep the dash instead of the replacement %2d ?

JCMB7
New user
Posts: 5
Joined: 04 Apr 2016, 22:34

Re: generic http + problems with special characters ?

#2 Post by JCMB7 » 11 May 2016, 23:08

Are you sure the server rejects it because of the correctly encoded dash?
Do you have access to the web server logs? Or the logs of the web application ?

For the volkszaehler demo server it was important to use the correct host-header. As of version R101 implemented

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: generic http + problems with special characters ?

#3 Post by kr0815 » 12 May 2016, 09:59

You are right, it´s for Volkszaehler.
About half a year ago, i modified the "general HTTP Interface", it worked so far
Now i wanted to give it a try with an actual release, didn´t get it to work

The problem is, my Volkszaehler is hostet on a public webserver ( 1und1)

I got it running again with a modified general HTTP Interface
I had to take out the URLEncode
in

Code: Select all

 url.replace("%valname%", URLEncode(ExtraTaskSettings.TaskDeviceValueNames[varIndex]));
I also had to hard-code the URL, because on a public web server, the URL can´t just be replaced by an IP-adress

Is it working for you out of the box ?
If some of the developers here want to further investigate the problem, i could give a test account to my server and send my modified general HTTP Interface ?

Regards
Klaus

JCMB7
New user
Posts: 5
Joined: 04 Apr 2016, 22:34

Re: generic http + problems with special characters ?

#4 Post by JCMB7 » 13 May 2016, 16:46

Hi Klaus,

I use version 105 without any modifications and it can successfully publish to demo.volkszahler.org and to my internal installation.
The URLEncode is no problem here.

the configuration works with these settings:
Config:
- Protocol: Generic HTTP
- Locate Controller: Use Hostname
- Controller Hostname: demo.volkszaehler.org
- Controller Port: 80
Tools - Advanced:
- Publish Template: middleware.php/data/%tskname%.json?operation=add&value=%value%
Devices:
- Name: -- UUID from volkszaehler.org --
- Delay: 60
- IDX: 1
- Send Date: checked

this works since R88 where the taskname and valuename fields were extended to 40
and R101 where the hostname was posted - required for webservers with several vhosts - maybe this could have been an issue with your server at 1und1.

regards,
Timo

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: generic http + problems with special characters ?

#5 Post by kr0815 » 13 May 2016, 20:06

Hello Timo,

very strange, i tried all possible configurations
I used the newest ESP-Easy-Version, maybe a bug there ?

If you, or somebody else, like, i could give you a test account to my server, send me a private mail here

Volkszaehler together with esp-easy makes a really good thing, hopefully it´s working 100% soon

smakowsky
New user
Posts: 1
Joined: 12 Jul 2016, 07:38

Re: generic http + problems with special characters ?

#6 Post by smakowsky » 12 Jul 2016, 15:59

Hello

I have a Same Problem

I have a firmware R108

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests