Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

HTTP 400 on uploading *new* nodes #2115

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 8 comments
Closed

HTTP 400 on uploading *new* nodes #2115

openstreetmap-trac opened this issue Jul 23, 2021 · 8 comments

Comments

@openstreetmap-trac
Copy link

Reporter: BearT
[Submitted to the original trac issue database at 5.14am, Friday, 31st July 2009]

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?

@openstreetmap-trac
Copy link
Author

Author: Koying
[Added to the original trac issue at 8.18am, Friday, 31st July 2009]

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.

@openstreetmap-trac
Copy link
Author

Author: BearT
[Added to the original trac issue at 8.35am, Friday, 31st July 2009]

Replying to [comment:1 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?

@openstreetmap-trac
Copy link
Author

Author: Koying
[Added to the original trac issue at 8.41am, Friday, 31st July 2009]

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

@openstreetmap-trac
Copy link
Author

Author: BearT
[Added to the original trac issue at 9.01am, Friday, 31st July 2009]

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.

@openstreetmap-trac
Copy link
Author

Author: Koying
[Added to the original trac issue at 9.04am, Friday, 31st July 2009]

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...

@openstreetmap-trac
Copy link
Author

Author: BearT
[Added to the original trac issue at 6.36am, Wednesday, 5th August 2009]

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.

@openstreetmap-trac
Copy link
Author

Author: BearT
[Added to the original trac issue at 6.54am, Wednesday, 5th August 2009]

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 Landstraer Hptstr: addresses & shops'' to ''Landstraer 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.)

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 8.43am, Wednesday, 5th August 2009]

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant