#15531 closed enhancement (fixed)
Option to see the traffic between JOSM and OSM servers
Reported by: | naoliv | Owned by: | naoliv |
---|---|---|---|
Priority: | normal | Milestone: | 17.11 |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
Could we have a way to see the payload that JOSM sends to OSM servers, please?
Even with --debug
it's not possible to see what JOSM sends.
For example:
2017-11-08 11:08:34.917 INFO: POST http://master.apis.dev.openstreetmap.org/api/0.6/changeset/108073/upload (529 B) ... 2017-11-08 11:08:35.156 FINE: Uploading data ... 2017-11-08 11:08:35.396 INFO: POST http://master.apis.dev.openstreetmap.org/api/0.6/changeset/108073/upload -> 301 (380 B) (...)
JOSM:
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2017-11-07 00:03:11 +0100 (Tue, 07 Nov 2017) Revision:13096 Build-Date:2017-11-07 02:33:06 URL:http://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (13096 en) Linux Debian GNU/Linux testing (buster) Memory Usage: 624 MB / 7168 MB (496 MB allocated, but free) Java version: 9.0.1+11-Debian-1, Oracle Corporation, OpenJDK 64-Bit Server VM Screen: :0.0 1600x900, :0.1 1280x1024 Maximum Screen Size: 1600x1024 Java package: openjdk-9-jre:amd64-9.0.1+11-1 Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-13 VM arguments: [-Djosm.home=<josm.pref>, -Dawt.useSystemAAFontSettings=on] Program arguments: [--debug, --language=en] Dataset consistency test: No problems found
Attachments (0)
Change History (10)
comment:1 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
comment:2 by , 7 years ago
Of course this would add nothing for JOSM users in general, but I would like to see and learn, from a nice program, how exactly the API works :-)
comment:4 by , 7 years ago
Replying to Don-vip:
Have you tried with
--trace
?
While it gets extremely verbose, it still doesn't display what it sends/receives.
follow-up: 6 comment:5 by , 7 years ago
Resolution: | → wontfix |
---|---|
Status: | needinfo → closed |
Either use wireshark or tcpdump
tcpdump -a host master.apis.dev.openstreetmap.org
As long as you use HTTP there are easier ways to snip TCP transmission.
comment:6 by , 7 years ago
Replying to stoecker:
Either use wireshark or tcpdump
tcpdump -a host master.apis.dev.openstreetmap.orgAs long as you use HTTP there are easier ways to snip TCP transmission.
Does that work? Last time I tried, there were automatic redirects to https in place.
I also need this feature from time to time and usually just add a println
in OsmApi.sendRequest
.
comment:7 by , 7 years ago
It redirects to HTTPS. See #15532
It should be possible to capture on the first POST to HTTP (before the redirect)
From the same example from the other ticket:
2017-11-08 11:08:34.917 INFO: POST http://master.apis.dev.openstreetmap.org/api/0.6/changeset/108073/upload (529 B) ... 2017-11-08 11:08:35.156 FINE: Uploading data ... 2017-11-08 11:08:35.396 INFO: POST http://master.apis.dev.openstreetmap.org/api/0.6/changeset/108073/upload -> 301 (380 B) 2017-11-08 11:08:35.397 FINE: RESPONSE: {null=[HTTP/1.1 301 Moved Permanently], Server=[Apache/2.4.18 (Ubuntu)], Connection=[close], Content-Length=[380], Date=[Wed, 08 Nov 2017 13:08:36 GMT], Content-Type=[text/html; charset=iso-8859-1], Location=[https://master.apis.dev.openstreetmap.org/api/0.6/changeset/108073/upload]} 2017-11-08 11:08:35.397 INFO: Download redirected to 'https://master.apis.dev.openstreetmap.org/api/0.6/changeset/108073/upload' 2017-11-08 11:08:35.398 FINE: Contacting Server... 2017-11-08 11:08:35.398 FINE: null 2017-11-08 11:08:35.399 INFO: POST https://master.apis.dev.openstreetmap.org/api/0.6/changeset/108073/upload (529 B) ... 2017-11-08 11:08:35.886 FINE: Uploading data ...
comment:8 by , 7 years ago
With https it is a bit more complicated. You need to use one of the many local proxies. Either one for directly data analysis or only to have the connection to the proxy with http. Google said "Fiddler" as one of the first keywords.
comment:10 by , 7 years ago
Milestone: | → 17.11 |
---|
Why?