Skip to content

Commit bacc9e3

Browse files
committed
refactor(oauth): leave android header unmodified (fixes #131)
1 parent 724b960 commit bacc9e3

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/client.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ fn request(method: &'static Method, path: String, redirect: bool, quarantine: bo
170170
// Construct the hyper client from the HTTPS connector.
171171
let client: Client<_, Body> = CLIENT.clone();
172172

173-
let (token, vendor_id, device_id, mut user_agent, loid) = {
173+
let (token, vendor_id, device_id, user_agent, loid) = {
174174
let client = block_on(OAUTH_CLIENT.read());
175175
(
176176
client.token.clone(),
@@ -181,13 +181,6 @@ fn request(method: &'static Method, path: String, redirect: bool, quarantine: bo
181181
)
182182
};
183183

184-
// Replace "Android" with a tricky word.
185-
// Issues: #78/#115, #116
186-
// If you include the word "Android", you will get a number of different errors
187-
// I guess they don't expect mobile traffic on the endpoints we use
188-
// Scrawled on wall for next poor soul: Run the test suite.
189-
user_agent = user_agent.replace("Android", "Andr\u{200B}oid");
190-
191184
// Build request to Reddit. When making a GET, request gzip compression.
192185
// (Reddit doesn't do brotli yet.)
193186
let builder = Request::builder()

0 commit comments

Comments
 (0)