Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

How to access a longer POST message with NetX HTTP and NetX_Duo

$
0
0

I try to receive a longer POST-message with NetX-HTTP but can only access the first packet of the data sent.
Because NetX-HTTP is not really sufficient documented I used the example from here.
This is the POST-message I sent with curl:

curl -X POST "target-ip/sensors/1/params" -v -H "accept: application/json" -H "Content-Type: application/json" -H "Expect:" -d "{ \"ptype\":\"ParamCurve\",\"name\":\"Hüllkurve H1\",\"id\":1,\"active\":true,\"base\":\"s\",\"time_step\":0.0036,\"curve0\":[{\"x\":0,\"y\":2086.97045772167,\"reference_point\":{\"x\":0,\"y\":1980}},{\"x\":-19,\"y\":1738.3173851691909,\"reference_point\":{\"x\":125,\"y\":677}},{\"x\":33,\"y\":1047.8402858520287,\"reference_point\":{\"x\":125,\"y\":677}},{\"x\":-53,\"y\":556.5996850308085,\"reference_point\":{\"x\":258,\"y\":1}},{\"x\":-1,\"y\":292.59968503080836,\"reference_point\":{\"x\":258,\"y\":1}},{\"x\":23,\"y\":168.75067674973027,\"reference_point\":{\"x\":258,\"y\":1}},{\"x\":75,\"y\":229.02576997456418,\"reference_point\":{\"x\":258,\"y\":1}},{\"x\":-51,\"y\":244.02397292467552,\"reference_point\":{\"x\":457,\"y\":115}},{\"x\":0,\"y\":1266.68273027125,\"reference_point\":{\"x\":457,\"y\":115}},{\"x\":-50,\"y\":1796.371220259382,\"reference_point\":{\"x\":574,\"y\":1736}},{\"x\":16,\"y\":1868.0257699745666,\"reference_point\":{\"x\":574,\"y\":1736}},{\"x\":67,\"y\":1912.0257699745641,\"reference_point\":{\"x\":574,\"y\":1736}},{\"x\":144,\"y\":1948.9704577216698,\"reference_point\":{\"x\":574,\"y\":1736}},{\"x\":195,\"y\":1949.9704577216698,\"reference_point\":{\"x\":574,\"y\":1736}},{\"x\":-208,\"y\":1954.9704577216698,\"reference_point\":{\"x\":1028,\"y\":1979}},{\"x\":-157,\"y\":1956.97045772167,\"reference_point\":{\"x\":1028,\"y\":1979}},{\"x\":-131,\"y\":1974.0202284994862,\"reference_point\":{\"x\":1028,\"y\":1979}},{\"x\":-80,\"y\":2025.0257699745666,\"reference_point\":{\"x\":1028,\"y\":1979}}],\"curve1\":[{\"x\":0,\"y\":1873.02954227833,\"reference_point\":{\"x\":0,\"y\":1980}},{\"x\":47,\"y\":1022.1597141479713,\"reference_point\":{\"x\":0,\"y\":1980}},{\"x\":-23,\"y\":479.40031496919164,\"reference_point\":{\"x\":125,\"y\":677}},{\"x\":29,\"y\":215.40031496919164,\"reference_point\":{\"x\":125,\"y\":677}},{\"x\":-49,\"y\":-53.97202497450879,\"reference_point\":{\"x\":258,\"y\":1}},{\"x\":89,\"y\":3.6287797406177247,\"reference_point\":{\"x\":258,\"y\":1}},{\"x\":-73,\"y\":38.974230025435816,\"reference_point\":{\"x\":457,\"y\":115}},{\"x\":-73,\"y\":59.974230025435816,\"reference_point\":{\"x\":457,\"y\":115}},{\"x\":-57,\"y\":218.40534115725853,\"reference_point\":{\"x\":574,\"y\":1736}},{\"x\":-6,\"y\":1239.31726972875,\"reference_point\":{\"x\":574,\"y\":1736}},{\"x\":30,\"y\":1647.628779740618,\"reference_point\":{\"x\":574,\"y\":1736}},{\"x\":67,\"y\":1677.9742300254334,\"reference_point\":{\"x\":574,\"y\":1736}},{\"x\":118,\"y\":1721.974230025436,\"reference_point\":{\"x\":574,\"y\":1736}},{\"x\":144,\"y\":1735.0295422783302,\"reference_point\":{\"x\":574,\"y\":1736}},{\"x\":195,\"y\":1736.0295422783302,\"reference_point\":{\"x\":574,\"y\":1736}},{\"x\":-208,\"y\":1741.0295422783302,\"reference_point\":{\"x\":1028,\"y\":1979}},{\"x\":-157,\"y\":1743.0295422783302,\"reference_point\":{\"x\":1028,\"y\":1979}},{\"x\":-80,\"y\":1783.9797715005138,\"reference_point\":{\"x\":1028,\"y\":1979}},{\"x\":-29,\"y\":1834.9742300254334,\"reference_point\":{\"x\":1028,\"y\":1979}}],\"range\":{\"start\":15,\"end\":500}}"

The protocol from curl:

* Connected to target-ip (192.168.20.118) port 80 (#0)
> POST /sensors/1/params HTTP/1.1
> Host: NetX-HTTP
> User-Agent: curl/7.61.0
> accept: application/json
> Content-Type: application/json
> Content-Length: 2688
>
* upload completely sent off: 2688 out of 2688 bytes

Even if the content-length was recognised correct (2688 Bytes) the loop with "nx_http_server_get_entity_content" only run once reading 90 Bytes.
The packet content adressed by the prepent_ptr (0x20009188) contains only 2415 Bytes (ends at 0x2000969F). The next packet ist not accessible.


The maximal ressource-length of the Netx-HTTP-server is set to 4096 bytes.

I had to disable the multipart-functionality in curl (-H "Expect:") because the http-server didn't handle the "100-continue" request from curl and the transfer stucked.
Any ideas how to access the missing part of the POST-request?


Viewing all articles
Browse latest Browse all 5781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>