{"action":"created","issue":{"url":"https://api.github.com/repos/square/retrofit/issues/1097","labels_url":"https://api.github.com/repos/square/retrofit/issues/1097/labels{/name}","comments_url":"https://api.github.com/repos/square/retrofit/issues/1097/comments","events_url":"https://api.github.com/repos/square/retrofit/issues/1097/events","html_url":"https://github.com/square/retrofit/issues/1097","id":107330468,"number":1097,"title":"2.0-beta1, Manually creating and encoding a RequestBody causes Content-Length to always be '2'","user":{"login":"stoyicker","id":1732935,"avatar_url":"https://avatars.githubusercontent.com/u/1732935?v=3","gravatar_id":"","url":"https://api.github.com/users/stoyicker","html_url":"https://github.com/stoyicker","followers_url":"https://api.github.com/users/stoyicker/followers","following_url":"https://api.github.com/users/stoyicker/following{/other_user}","gists_url":"https://api.github.com/users/stoyicker/gists{/gist_id}","starred_url":"https://api.github.com/users/stoyicker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoyicker/subscriptions","organizations_url":"https://api.github.com/users/stoyicker/orgs","repos_url":"https://api.github.com/users/stoyicker/repos","events_url":"https://api.github.com/users/stoyicker/events{/privacy}","received_events_url":"https://api.github.com/users/stoyicker/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-19T12:45:44Z","updated_at":"2015-09-22T00:15:29Z","closed_at":"2015-09-20T04:23:13Z","body":"Migrated from https://github.com/square/okhttp/issues/1864\r\n\r\nCreating a request body does not seem to properly understand its size. \r\nSee http://stackoverflow.com/questions/32647760/okhttp-requestbody-returning-wrong-content-length/32664465#32664465 for context.\r\n\r\nMNWE: https://github.com/stoyicker/okHttpContentLength2Bug - Run the unit test."},"comment":{"url":"https://api.github.com/repos/square/retrofit/issues/comments/142144015","html_url":"https://github.com/square/retrofit/issues/1097#issuecomment-142144015","issue_url":"https://api.github.com/repos/square/retrofit/issues/1097","id":142144015,"user":{"login":"kristjanmik","id":911107,"avatar_url":"https://avatars.githubusercontent.com/u/911107?v=3","gravatar_id":"","url":"https://api.github.com/users/kristjanmik","html_url":"https://github.com/kristjanmik","followers_url":"https://api.github.com/users/kristjanmik/followers","following_url":"https://api.github.com/users/kristjanmik/following{/other_user}","gists_url":"https://api.github.com/users/kristjanmik/gists{/gist_id}","starred_url":"https://api.github.com/users/kristjanmik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristjanmik/subscriptions","organizations_url":"https://api.github.com/users/kristjanmik/orgs","repos_url":"https://api.github.com/users/kristjanmik/repos","events_url":"https://api.github.com/users/kristjanmik/events{/privacy}","received_events_url":"https://api.github.com/users/kristjanmik/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T00:15:29Z","updated_at":"2015-09-22T00:15:29Z","body":"Still getting the same results with build 67(compile group: 'com.squareup.retrofit', name: 'retrofit', version: '2.0.0-SNAPSHOT-67')\r\n\r\n`````java\r\nRequestBody filebody = RequestBody.create(MediaType.parse(mimeType), file);\r\nfilebody.contentLength(); //is 699534\r\nfilebody.contentType(); //is image/jpeg\r\n``````\r\nWhen it hits the log interceptor/server it has content-length of 2"}}