Opened 10 years ago

Closed 10 years ago

#2115 closed defect (fixed)

HTTP 400 on uploading *new* nodes

Reported by: BearT Owned by: cbro@…
Priority: critical Milestone:
Component: merkaartor Version:
Keywords: Cc:

Description

I've tried several times to upload a few new nodes using Merkaartor. Since these are addresses/POIs I create about 10 new nodes, select all and write the addresses to all nodes at the same time. Afterwards I change the housenumbers and maybe some other tags (restaurant, ...) and try to upload these new nodes. I've never touched any old nodes, since these are likely to fail which would force me to redo all my changes.

The upload window shows only ADD operations but the response I get is always (tried now about 5 times) HTTP 400 'Bad Request'. Is there any way to debug how those bad requests look like (except Wireshark)?

I'm even not sure if this is a bug in M. since I used the very same version (r16742) to fix some existing ways (with adding a few nodes) in another part of the town, which worked perfectly.

So is there any easy way to see what exactly went wrong, so I can post more information here?

Attachments (2)

BadRequest.mdc.bz2 (57.7 KB) - added by BearT 10 years ago.
The mdc file of the scene that caused an HTTP400 on upload. (Bzip2 zipped because of upload limit)
HTTP400.log (841 bytes) - added by BearT 10 years ago.
The wireshark trace of the failed upload. Note the unescaped '&' character in the changeset name.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 10 years ago by Chris Browet

400 means that an error occured parsing the xml sent to the server, which is very much surprising...

Could save an MDC document before uploading and send it to me, please.

comment:2 in reply to:  1 Changed 10 years ago by BearT

Replying to Koying:

400 means that an error occured parsing the xml sent to the server, which is very much surprising...

Could save an MDC document before uploading and send it to me, please.

I'm sorry. I just left M. open and tried again just before reading your message. Everything worked fine. Since I have a lot of other stuff to draw and upload I'm quite sure, if this is really a bug with XML generation (I doubt that, since it worked afterwards) I will get the error again.

Since it seems that the XML requests generated are OK and I got the HTTP 400 for about 40 minutes and multiple tries, might this be a problem with my network? I have a new router which needs restarting WLAN every few days (though the computer in question has is connected via cable), so I wouldn't wonder if the rest of the routers software is as crappy. Could this be a possible cause?

comment:3 Changed 10 years ago by Chris Browet

If you want to be sure, save an MDC beforehand. We can always upload your changes from there.

Might be your router, or any router on the path to openstreetmap.org, or even the server itself, it is hard to tell.

However, if the request got to the server, I'm inclined to think the server had a transient error

comment:4 Changed 10 years ago by BearT

Resolution: worksforme
Status: newclosed

So I close this ticket. If I encounter this error again and have some files to upload, I'll do so and reopen the ticket. Anyway, thanks for your help.

comment:5 Changed 10 years ago by Chris Browet

Ok.

Now that that I think about it, I think a saw a commit to the server regarding xml parsing. Probably is/was the problem...

comment:6 Changed 10 years ago by BearT

Resolution: worksforme
Status: closedreopened

I just encountered the Bad Request error again. I just uploaded 10 minutes ago, added a few new nodes and got the HTTP400. Just to be sure this is no random error inside M. I add the mdc file.

Changed 10 years ago by BearT

Attachment: BadRequest.mdc.bz2 added

The mdc file of the scene that caused an HTTP400 on upload. (Bzip2 zipped because of upload limit)

comment:7 Changed 10 years ago by BearT

Priority: majorcritical

It *is* a problem in M. The random factor seems to be me typing the commit message. Since this is not stored in M. the messages changes when I try to upload again and again. The XML special character '&' is not escaped correctly in these upload messages. (See the attached Wireshark logfile below.)

I changed the commit message from Landstraßer Hptstr: addresses & shops to Landstraßer Hptstr: addresses + shops and the upload finished without any problems. I suspect one could try out some other characters to send some really weird stuff to the server, so I raised the priority to critical. (Though all of these messages should be sanitized by the server anyway.)

Changed 10 years ago by BearT

Attachment: HTTP400.log added

The wireshark trace of the failed upload. Note the unescaped '&' character in the changeset name.

comment:8 Changed 10 years ago by Chris Browet

Resolution: fixed
Status: reopenedclosed

(In [16868]) FIX : XML encode the changeset comments (fixes #2115)

Note: See TracTickets for help on using tickets.