This repository was archived by the owner on Mar 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
owncloudComLibrary/src/main/java/com/owncloud/android/lib/common Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change 43
43
import java .io .IOException ;
44
44
import java .io .InputStream ;
45
45
import java .util .List ;
46
+ import java .util .Locale ;
46
47
47
48
import static com .owncloud .android .lib .common .http .HttpConstants .AUTHORIZATION_HEADER ;
48
49
import static com .owncloud .android .lib .common .http .HttpConstants .HTTP_MOVED_PERMANENTLY ;
@@ -128,6 +129,7 @@ private int saveExecuteHttpMethod(HttpBaseMethod method) throws Exception {
128
129
Timber .d ("Executing in request with id %s" , requestId );
129
130
method .setRequestHeader (HttpConstants .OC_X_REQUEST_ID , requestId );
130
131
method .setRequestHeader (HttpConstants .USER_AGENT_HEADER , SingleSessionManager .getUserAgent ());
132
+ method .setRequestHeader (HttpConstants .ACCEPT_LANGUAGE_HEADER , Locale .getDefault ().getLanguage ());
131
133
method .setRequestHeader (HttpConstants .ACCEPT_ENCODING_HEADER , HttpConstants .ACCEPT_ENCODING_IDENTITY );
132
134
if (mCredentials .getHeaderAuth () != null && !mCredentials .getHeaderAuth ().isEmpty ()) {
133
135
method .setRequestHeader (AUTHORIZATION_HEADER , mCredentials .getHeaderAuth ());
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ public class HttpConstants {
40
40
public static final String IF_MATCH_HEADER = "If-Match" ;
41
41
public static final String IF_NONE_MATCH_HEADER = "If-None-Match" ;
42
42
public static final String CONTENT_TYPE_HEADER = "Content-Type" ;
43
+ public static final String ACCEPT_LANGUAGE_HEADER = "Accept-Language" ;
43
44
public static final String CONTENT_LENGTH_HEADER = "Content-Length" ;
44
45
public static final String OC_TOTAL_LENGTH_HEADER = "OC-Total-Length" ;
45
46
public static final String OC_X_OC_MTIME_HEADER = "X-OC-Mtime" ;
You can’t perform that action at this time.
0 commit comments