Differences From Artifact [716b3b017c]:
- File
src/OFMutableURL.h
— part of check-in
[5f7305c659]
at
2017-10-31 21:39:36
on branch trunk
— OFURL: URL-encode according to RFC 3986
This also means the parameters go away and get folded into the path. (user: js, size: 2318) [annotate] [blame] [check-ins using]
To Artifact [cd0e75d21f]:
- File
src/OFMutableURL.h
— part of check-in
[a15b403a11]
at
2017-11-06 23:01:57
on branch trunk
— OFURL: Store the URL-encoded version internally
This allows retrieving it how it was originally stored, which is useful
for example for query strings, as these often URL-encode allowed
characters in order to allow pairs of the form foo=bar&bar=qux. (user: js, size: 4321) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | */ @interface OFMutableURL: OFURL /*! * The scheme part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *scheme; /*! * The host part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *host; /*! * The port part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFNumber *port; /*! * The user part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *user; /*! * The password part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *password; /*! * The path part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *path; /*! * The path of the URL split into components. * * The first component must always be empty to designate the root. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFArray OF_GENERIC(OFString *) *pathComponents; /*! * The query part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *query; /*! * The fragment part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *fragment; /*! * @brief Creates a new mutable URL. * * @return A new, autoreleased OFMutableURL */ + (instancetype)URL; | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | */ @interface OFMutableURL: OFURL /*! * The scheme part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *scheme; /*! * The scheme part of the URL in URL-encoded form. * * Setting this retains the original URL-encoding used - if more characters * than necessary are URL-encoded, it is kept this way. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *URLEncodedScheme; /*! * The host part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *host; /*! * The host part of the URL in URL-encoded form. * * Setting this retains the original URL-encoding used - if more characters * than necessary are URL-encoded, it is kept this way. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *URLEncodedHost; /*! * The port part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFNumber *port; /*! * The user part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *user; /*! * The user part of the URL in URL-encoded form. * * Setting this retains the original URL-encoding used - if more characters * than necessary are URL-encoded, it is kept this way. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *URLEncodedUser; /*! * The password part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *password; /*! * The password part of the URL in URL-encoded form. * * Setting this retains the original URL-encoding used - if more characters * than necessary are URL-encoded, it is kept this way. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *URLEncodedPassword; /*! * The path part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *path; /*! * The path part of the URL in URL-encoded form. * * Setting this retains the original URL-encoding used - if more characters * than necessary are URL-encoded, it is kept this way. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *URLEncodedPath; /*! * The path of the URL split into components. * * The first component must always be empty to designate the root. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFArray OF_GENERIC(OFString *) *pathComponents; /*! * The query part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *query; /*! * The query part of the URL in URL-encoded form. * * Setting this retains the original URL-encoding used - if more characters * than necessary are URL-encoded, it is kept this way. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *URLEncodedQuery; /*! * The fragment part of the URL. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *fragment; /*! * The fragment part of the URL in URL-encoded form. * * Setting this retains the original URL-encoding used - if more characters * than necessary are URL-encoded, it is kept this way. */ @property OF_NULLABLE_PROPERTY (readwrite, copy, nonatomic) OFString *URLEncodedFragment; /*! * @brief Creates a new mutable URL. * * @return A new, autoreleased OFMutableURL */ + (instancetype)URL; |
︙ | ︙ |