Kenneth Hsu
2aa76881a5
Mark fields that don't need to be reassigned as readonly.
...
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2019-10-19 13:59:22 -07:00
Kenneth Hsu
9e465c602d
Fix invalid regex pattern.
...
This was introduced as part of revision b8199ad1c4 ("Fixed handling of
multi-byte characters in both HttpServer and Duplicati") to resolve
issues #1063 and #1085 . However, the regex pattern was invalid. This
reverts the pattern to the previous value, which seems more appropriate
since most non-standard encodings are of the form %uxxxx where xxxx is a
4 byte hex string representing a UTF-16 code.
This fixes issue #3737 .
2019-09-28 10:05:34 -07:00
verhoek
41234a314d
Introduced UrlPath wrapper for stringbuilder to ease concatenation of multiple paths.
...
Started cleaning googlecloud services API.
2018-05-18 22:55:09 +02:00
verhoek
be79384966
Removed duplicate ? when building urls with query parameters.
2018-05-15 21:50:14 +02:00
verhoek
bbf489c86f
Corrected appending paths to urls.
2018-05-14 22:53:13 +02:00
verhoek
6dd64a553d
Fixed code quality issues.
2018-05-14 21:01:18 +02:00
verhoek
44b5b00276
Renamed some googledriveapi var names. Modified ListFolder to be more readable.
2018-05-11 19:57:09 +02:00
verhoek
78a46c3a5c
Renamed misspelled class urluttility to urlutility and newly added urlutility to uriutility.
2018-05-11 19:09:14 +02:00
verhoek
d303db30d6
Replacing magic strings in google drive rest calls by query key value pairs.
2018-05-11 18:23:16 +02:00
Kenneth Skovhede and GitHub
96cd4dd725
Merge pull request #3087 from warwickmm/use_nameof_operator
...
Use nameof operator when constructing ArgumentNullException
2018-03-08 11:14:49 +01:00
Kenneth Hsu
ec7aa3113b
Fix namespace in code references in XML documentation.
2018-03-07 18:34:26 -08:00
Kenneth Hsu
1f8b542604
Use nameof operator when constructing ArgumentNullException.
...
This will make rename refactorings easier in the future.
2018-03-07 17:53:08 -08:00
Kenneth Hsu
8810e0130d
Make string comparisons use ordinal (binary) sort rules.
...
These string comparisons should not be culture-aware.
2017-11-26 11:19:54 -08:00
Kenneth Hsu
b84e7bd34d
Avoid hard-coded parameter names.
...
This makes it easier to rename the parameter in the future as we don't
have to search for the parameter name within strings.
2017-09-25 19:54:54 -07:00
Tyler Gill
83a1dcfb64
Replace all instances of InvariantCultureIgnoreCase with OrdinalIgnoreCase in string comparisons.
...
InvariantCulture is useful when comparing / sorting human language strings in a culturely correct way. It handles things like accented letters in a way that makes sense to humans (e.g., 'a' should be sorted next to 'á', rather than after 'z').
Ordinal looks just at the raw code points of the characters. As such, it is recommended for use in cases when comparing system strings (file paths, command line parameters, config settings, etc.). Since it doesn't need to use the culture specific sorting rules, this method can often be faster.
For more information, see https://stackoverflow.com/questions/492799/difference-between-invariantculture-and-ordinal-string-comparison (and other related questions)
2017-09-18 23:55:08 -06:00
Kenneth Skovhede
66aaaab0a8
Fixed an issue with the URL parser being a little too flexible, which breaks if the URL has the port component.
...
This change means that URL's in the form `scheme://username:password@server` can no longer have any of the characters `:?/` in the username or password component without encoding.
2017-03-07 11:05:49 +01:00
Vaporizer8 and GitHub
228ade0209
Handle paths with leading /
...
Paths with a leading / can cause issues with some WebDAV servers (IIS) as this results in https://example.com//foo/bar/
2016-07-12 21:33:28 +02:00
Kenneth Skovhede
3149064cde
Merge branch 'no_more_resx'
2015-01-20 21:45:54 +01:00
Kenneth Skovhede
8d13e698eb
Updated copyright notices
2015-01-20 21:44:52 +01:00
Kenneth Skovhede
16c791f0b5
Removed all resx files, now using Duplicati.Library.Localization exclusively
2015-01-20 21:07:24 +01:00
Kenneth Skovhede
89cedb89ca
Fixed handling file://c:\test with the new parser
2014-09-02 18:05:07 +02:00
Kenneth Skovhede
66cb9df64d
Fixed #1090
...
Handling URI with no hostname
2014-08-26 12:52:53 +02:00
Kenneth Skovhede
63987d2369
Fixed an escape char that did not work well with Windows
2014-08-16 14:19:32 +02:00
Kenneth Skovhede
b8199ad1c4
Fixed handling of multi-byte characters in both HttpServer and Duplicati.
...
This fixes issue #1085 and issue #1063 .
2014-08-13 23:42:26 +02:00
Kenneth Skovhede
00e6554842
Allowed detection of URI with no hostname component
2014-07-25 15:48:10 +02:00
Kenneth Skovhede
d0ea1de01a
Added UrlPathEncode i utility
2014-06-09 09:13:17 +02:00
Kenneth Skovhede
5f5c309cec
Fixed parsing windows paths with file:// prefix
2014-03-20 15:07:47 +01:00
Kenneth Skovhede
4dafb85ec9
Exposed the url encode/decode functions
2014-03-12 01:42:16 +01:00
Kenneth Skovhede
f82f2b3b0e
Updated URI regexp to be even more flexible
2014-02-28 14:02:51 +01:00
Kenneth Skovhede
add5534c50
Don't depend on System.Web because it is broken on Mono
...
Update issue #940
Status: Fixed
I took another approach and now manually parse and encode these strings.
This is done to avoid using System.Uri.EscapeUriString because it has some subtle issues:
http://blogs.msdn.com/b/yangxind/archive/2006/11/09/don-t-use-net-system-uri-unescapedatastring-in-url-decoding.aspx
2014-02-10 14:35:02 +01:00
Kenneth Skovhede
c3ae36b4cd
Fixed parsing urls with no path information
2013-05-20 14:05:28 +02:00
Kenneth Skovhede
c596434cab
Removed unused options and dropped the fh- prefix for forest hash options
2013-05-08 19:57:13 +02:00
Kenneth Skovhede
d3f4058057
Fixed various minor issues with backends
2013-05-06 20:36:26 +02:00
Kenneth Skovhede
07adaa53c9
Added url encode/decode for the username and password to allow all kinds of username/password setups
2013-05-06 09:10:41 +02:00
Kenneth Skovhede
68bf7109f7
Bugfix to the Uri parser
2013-05-06 09:00:29 +02:00
Kenneth Skovhede
e5b3f0ea93
Rewrote all backends to use the new Uri parser.
...
Updated the regex to be a little more forgiving.
Does not handle paths with @, like "ftp://server/@folder"
2013-05-05 23:46:00 +02:00
Kenneth Skovhede
86b52d364d
Added a custom URL parser
2013-05-05 21:18:00 +02:00