1

나는 아파치 HTTP 클라이언트 라이브러리에 대한 로깅 출력을 사용하도록 설정하고이 서버가 내 게시물 하나에 응답하게하는 샘플 응답입니다 :JSON 응답을 여러 줄로 나눌 이유가 무엇일까요?

D/org.apache.http.wire(18597): << "HTTP/1.1 200 OK[EOL]" 
D/org.apache.http.wire(18597): << "X-Backside-Transport: OK OK,OK OK,OK OK[EOL]" 
D/org.apache.http.wire(18597): << "Date: 2013-05-07T16:19:49+03:00[EOL]" 
D/org.apache.http.wire(18597): << "Content-Type: application/json[EOL]" 
D/org.apache.http.wire(18597): << "User-Agent: Apache-HttpClient/UNAVAILABLE (java 1.4)[EOL]" 
D/org.apache.http.wire(18597): << "Surrogate-Capability: cache-b2="Surrogate/1.0"[EOL]" 
D/org.apache.http.wire(18597): << "Cache-Control: max-age=259200[EOL]" 
D/org.apache.http.wire(18597): << "X-Cache: MISS from cache-b2[EOL]" 
D/org.apache.http.wire(18597): << "Transfer-Encoding: chunked[EOL]" 
D/org.apache.http.wire(18597): << "Via: 1.1 cache-b2 (squid)[EOL]" 
D/org.apache.http.wire(18597): << "Connection: keep-alive[EOL]" 
D/org.apache.http.wire(18597): << "12A[EOL]" 
D/org.apache.http.wire(18597): << "{"lightLoginResponse":{"authenticationToken":{"token":{"$":"b17SI\/E0exjXPbsYgSusIVr7I0MMxLsVxrw6rXgOzpoGKwdVN+isYJTOW2ZP\/r3Bm9x+zP9xxCSEQ58R8Cm4GKRPjhrUwBbaibD8un5aPIKWk8k74+0vIMApnNo5DODyEuVBNvvmoSJ66ri7iF7iBx98BbyiGNswkfXP1tG4RXrDHuUmmrSwZltAIoBTfDxV05R61vxZg8JbNfPyfj7bwpvaVHaA8UUGKRrk03yim9jG" 
D/org.apache.http.wire(18597): << "[\r]" 
D/org.apache.http.wire(18597): << "[\n]" 
D/org.apache.http.wire(18597): << "5A8[EOL]" 
D/org.apache.http.wire(18597): << "Fg+9GaCUgOkbTB0SPStdwW8UhFctS\/5vK1fGqcLBdHO3\/bzLI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KsoJyt26Pq8Az36ridMbyBMmSmHvnB1e9uNmpL86sGG+ZZbxTbLRDmKLk\/FO7EBQ4ug7WtS3MlylvvHXorv+IN1++xAj3sduJIWmKObBtA76jDUiTvgCJ2mp4VLI5me9UsIxRnFJheixLmU3vZdqRWJIh6WSwJ15r+dV34aGB2WzKQtrSc5LO5SI3C7fJqgRuZfFHQTdtldJz8+D4gelbkIlTQrQknY46qJrAQFRvbyE\/ndRnun0ho76KM5CL965G0Pdy5YPG\/PfwE5\/CaWWYxg303rJMC3HNNqSqIq6Qmi4Vhm8870Yr5BzUTudcZbhx" 
D/org.apache.http.wire(18597): << "[\r]" 
D/org.apache.http.wire(18597): << "[\n]" 
D/org.apache.http.wire(18597): << "5A8[EOL]" 
D/org.apache.http.wire(18597): << "RBKnEF5hKSVH+YNLUwVpUzokS+kQKVN\/F+mr72gXlVFKuDeAY5kyAcDslOKCJmYn35c7TJP+iF4SvjYs2qLc8nXGo0p5N5INhtf9NMtYAhzWTD8nnecvg0B3v5WU2Ped+mQOC9mMTOeuzwFfZrX0WROBqM9M68Qu+fI29wAhQ\/8j7FYhisBaZCl4x09uH7fn+xWFQ9JLhxBdZcA82bzydXB3fVbhLi8QwwkQ5OuWhtg6vN3bry\/G\/nIcnjRQxoCvK6kMaVgaAXLF6MGmPP7e7Xgcsml8yPHjGVmp5sIOUVQZVH4eifncfgYzr7a\/naFbnTAhJK2I5XnV6KIJhngJzM54Vf1q3uZt9FxFFDGBK6X3iw9kNTfoOA161Ia72TnTu3enu0OMX7fzuJ9nissjhmFxfbwS5bkurdM4eW8OUJyEi03sNSdODw4h0O2TqrD6QfeKOlM+oK1Vx3FWPdQ7eYZaNCgeyYH7UM+k3vgChVUmbciTare6tyxC1DZAgMMuNMRTN4mVTRxJRrTt7vuUUdOkexzW07oOXmaH\/lRTvwX6+Pmp44LEVeOCkKYRm6fJUidO99WFk41zQrH9OjxNdoe512NrrtkLm6gVKidLRZC+8l1N88b6Dle\/g2kZCasQmv8\/whdk\/6QLwBVSypTZEhucVcuvNEZztMhlZhXO1Pz0mewESm8wIKBqbTgbJmnxYzPw7zy+3qzuyXLojTDqlnfLKtsIt8y3J+q33aYRa5ysr43kw4TUEmOcKL3sgLpy1H0H0ruchBBFn\/trEeVxlhbikr0ntb9ZRkhuw07wTdLCAXkQR\/Dxef1tRJRH\/6VvlCwtPceCUvVer36eoQg10Rp+Ve\/936kLtDGnfTU+WAboSRLCd\/0AlkPN49DdMM0afRR+BNie0oIiF1zirfHTQeF1iD+ukVXLHuj2nGWuy7zSr0VCVVan+zjhm\/btzIJl3clunO9T2hq2gOyGmwmpg4nvkat5aGdGApZjwnJtqex3aW+qNQNgTOaVd4z42OHBepGirFGu3v5V6aXctJdQIU7Zmx 
3JbUxpGe9yHW3Io0vczdvznxH\/dZIarTepvIBfuwUztVYlpfW\/Lvdm29YkGrPeKb4DKkdAA1dmBVz4Pcat+auhqV0oajt4MIIRZnX41XtQQoIX6+19ITA5CboOYZaXhkU8bmbiEYbodXEqVELVzqRpyzqN2ogx4qmk4YZ1Vw0Q9csDu8ocA2MzJSyUGpnOPkviuHP2h4Z7+AqnF9MUuHvQFkWDY58gPVsswK2QsE\/eRM\/sQbV3n7pIIBRwNzUAOhsoLPSGJfXqyATNlSh8WBC4QYJamFIolNfcKfHIg5yL1WeCKhLwMWqQENFQ3pN\/UguVkYpv4lCrmw2wKl8fgTeqMfm1uAXT0YGowel\/Em3zMyX05mUbKt4tsQy" 
D/org.apache.http.wire(18597): << "[\r]" 
D/org.apache.http.wire(18597): << "[\n]" 
D/org.apache.http.wire(18597): << "264[EOL]" 
D/org.apache.http.wire(18597): << "AptjdnYveZUSeMVszlcctrEKrKWw4DBQgtr5Bf5u\/9gzwFircV0JxNEbXRUKXxGDnPYg0mJVufhHl6\/qwt\/hQ6koUHFBHs2+p\/P+tlzoq9vP5s5gELupgBLzmioPqwgCsk8CeML6mwz2EMTXQcmN2XYRMlTYBSiRFVsq2wfHOiNh\/pCBV5u9iAqfURfWhCVS4sBzlP72ko9vlnGfcFFfQRzl5r\/bBcUW9qw96LfF9VDoJp2hyT\/JQCD0h4gf\/hAC+ol58DrlAWGe++nymQIaxt\/FDLNTS2pxQ8p7Bkstd9FrOXBitelbynxQLY+9KcEVOmxhhGdh4aGle3P8eyrXYQnaAM7KtHI4lkw5+mhQPxoc2AkjwpczXy"},"authLevel":{"$":1},"loginTime":{"$":"2013-05-07T13:19:52.415Z"},"notAfter":{"$":"2013-05-07T13:29:03Z"},"sessionMaxLength":{"$":1800},"tokenMaxAge":{"$":551},"profileId":{"$":"c1Osiab8eGmtYIog3vxda0OZu" 
D/org.apache.http.wire(18597): << "3POjgr+Gx4iNNgxaLk="}}}}" 
D/org.apache.http.wire(18597): << "[\r]" 
D/org.apache.http.wire(18597): << "[\n]" 

당신이 신체를 보면 당신은 볼거야 JSON 응답은 여러 줄로 나뉩니다. 나는 전에 이것을 만난 적이 없으며 이것이 여러 줄로 나뉘어지는 이유가 있는지 궁금해하고 있었다. 12A[EOL], 264[EOL]5A8[EOL]이라는 줄은 16 진수 값으로 다음 줄의 길이를 나타냅니다.

알 수없는 이유 (또는 보안 단순한 부조리)에 대한 맞춤 구현 인 경우 쓸모없는 줄을 제거하고 유효한 JSONObject 응답을 얻는 가장 좋은 방법은 무엇입니까?

이 주제는 오프 토픽 인 경우 죄송합니다. 감사.

답변

0

알아 냈습니다. 전송 인코딩이 청크로 인해 발생하는 것 같습니다.

관련 문제