Unfortunately SourceForge dropps the E-Mail support for all project websites on June 26, 2017 (which includes this forum).

E-Mail is required for registration, password-reset and notifications - therefore after this date the creation of new accounts will no longer be possible.

Is the Invalid Content Type check necessary?

For discussions, questions and problems using MOBAC
Posts: 1
Joined: 21 Oct 2016, 15:56

Is the Invalid Content Type check necessary?

Postby maloo » 21 Oct 2016, 16:30


I'm getting an invalid content type error consistently on certain tiles from a custom map source. (cyberjapandata.gsi.go.jp)
When downloaded from a web browser the tiles download correctly (and and can be opened in any picture viewer), however don't open in the browser which makes sense if the content type is wrong...

Looking at the log I see the following:

Code: Select all

2016-10-22 01:10:58,070 TRACE [Map preview thread 10] TileDownLoader: Retrieved 4423 bytes for a HTTP 200
2016-10-22 01:10:58,072 DEBUG [Map preview thread 10] TileLoader: Downloading of tile 16/58459/24107@Japan GSI failed
mobac.exceptions.UnrecoverableDownloadException: Content type of the loaded image is unknown: application/octet-stream
   at mobac.program.download.TileDownLoader.checkContentType(TileDownLoader.java:378)
   at mobac.program.download.TileDownLoader.downloadTileAndUpdateStore(TileDownLoader.java:160)

For example:
https://cyberjapandata.gsi.go.jp/xyz/std/16/58460/24107.png is Good
https://cyberjapandata.gsi.go.jp/xyz/std/16/58457/24107.png Downloads in MOBAC but fails the content type check.

I don't have access to the cyberjapandata server (maybe obviously) and my Japanese is not the best so I don't think I can change anything on the server side...

I was thinking the obvious solution would be to comment out the call to checkContentType but was wondering what side effects this would have?
Obviously its less checking which is not ideal, just wondering if there were reasons behind this check that I'm not aware of...

Anyway thanks for the great program and great work making it cross platform:)

Site Admin
Posts: 670
Joined: 25 Jun 2011, 14:00

Re: Is the Invalid Content Type check necessary?

Postby r_x » 21 Oct 2016, 18:35

If the check is necessary or not depends a lot on the server. On some server you can get error messages in form of a text message. In such a case it is important to check the content type.

The behavior you have observed on the cyberjapandata.gsi.go.jp server is from my point of view a clear server error. You can see that when clicking the links you have posted. The one opens the image in the browser, the other just downloads it to a file.

From my point of view this is simply an error of the server.
Please read the MOBAC FAQ and MOBAC README before posting.

Return to “Mobile Atlas Creator (English)”

Who is online

Users browsing this forum: No registered users and 1 guest