Android: Uppercase in URL with subfolder

Created on 14 Jun 2017  路  7Comments  路  Source: owncloud/android

Steps to reproduce

In login view, set in uppercase an URL with subfolder (e.g https://myserver.com:9845/owncloud")

Current behaviour

The URL is set to lower case, but only the left side of the slash "/": (https://myserver.com:9845/OWNCLOUD). The right side is not lower-cased and causes an error status: Bad Request

Expected behaviour

The URL is accepted, regadless of it is in uppercase or lowercase

Environment data

Android version: 7

Device model: Nexus 5X

ownCloud app version: 2.4.0

ownCloud server version: any

bug contributions are welcome login p4-low sev4-low

All 7 comments

@jesmrec I would like to work on this

go for it

@jesmrec In this case the part of the URL to the right side of the '/' should also be converted to lowercase?

yes, it is.

@jesmrec I don't think that the link after '/' is being converted to lower case. link

do not seem to. The point is that URL validation fails if it is not.

I'd like to add my two cents worth, if you don't mind, please.

I don't think you should be converting the URL's to upper or lower case. I just noticed a problem has cropped up on our WebStores for what appears to be Android users.

Their devices seem to be converting their entire URL's to lower case. This is causing problems for our Android users to access any of our pages that use parameters, as most of our parameters have a mixture of upper and lower case -- camel case, I think some people call it.

A valid request on our WebStore would be this:

URL Request: https://secure.dormitionskete.org:8443/dswebstore/mobile/viewdonationitem.zul?itemModelNo=Donation-BGPoor

However, when Android users click on a link to that page, it gets converted to something like this, which does not work, as our WebStore needs the parameter to be camel case in order to retrieve it.

URL Request: https://secure.dormitionskete.org:8443/dswebstore/mobile/viewdonationitem.zul?itemmodelno=donation-bgpoor

This is the User Agent info that our logs show this is happening with:

User Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Mobile Safari/537.36

So unless you can fix the code so it doesn't convert the URL to upper or lower case -- and why in the world would you want to monkey around with it anyway? -- we're going to have to change the parameter code in both our stores.

I'd really appreciate it if you would rethink the logic in why you want to convert URL's, since you are only likely to break people's websites by doing so.

Was this page helpful?
0 / 5 - 0 ratings