netty application with jersey 1.0 is not returning response immediately
I'm have netty application with requests processed by jersey 1.0 resources and writes back the content to netty channel after processing.
I have my code in github here.
The http request to netty is read by channel inbound handler here and it prints the below message to console.
request received
HttpObjectAggregator$AggregatedFullHttpRequest(decodeResult: success, version: HTTP/1.1, content: CompositeByteBuf(ridx: 0, widx: 0, cap: 0, components=0))
GET /hellonetty HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cookie: _ga=GA1.1.1996916298.1541452253; _gid=GA1.1.1674341523.1543246307
spf-debug: 3
spf-referrer: https://www.superchevy.com/features/1809-test-lab-61-did-gm-let-1963-corvette-slip-away/
spf-ip: 38.97.88.235
content-length: 0
Also, I'm writing the response back to the channel here.
This is written to console immediately as well.
in response writer respone DefaultFullHttpResponse(decodeResult: success, version: HTTP/1.1, content: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 11, cap: 64))
HTTP/1.1 200 OK
Content-Type: text/plain
But the response is not display in browser and browser still displays in program.
When I stopped the netty-jersey1 java program the response is displayed in the chrome browser immediately.
Any idea why I'm facing this weird behavior.
What is wrong with my coding?
java java-8 netty jersey-1.0
add a comment |
I'm have netty application with requests processed by jersey 1.0 resources and writes back the content to netty channel after processing.
I have my code in github here.
The http request to netty is read by channel inbound handler here and it prints the below message to console.
request received
HttpObjectAggregator$AggregatedFullHttpRequest(decodeResult: success, version: HTTP/1.1, content: CompositeByteBuf(ridx: 0, widx: 0, cap: 0, components=0))
GET /hellonetty HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cookie: _ga=GA1.1.1996916298.1541452253; _gid=GA1.1.1674341523.1543246307
spf-debug: 3
spf-referrer: https://www.superchevy.com/features/1809-test-lab-61-did-gm-let-1963-corvette-slip-away/
spf-ip: 38.97.88.235
content-length: 0
Also, I'm writing the response back to the channel here.
This is written to console immediately as well.
in response writer respone DefaultFullHttpResponse(decodeResult: success, version: HTTP/1.1, content: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 11, cap: 64))
HTTP/1.1 200 OK
Content-Type: text/plain
But the response is not display in browser and browser still displays in program.
When I stopped the netty-jersey1 java program the response is displayed in the chrome browser immediately.
Any idea why I'm facing this weird behavior.
What is wrong with my coding?
java java-8 netty jersey-1.0
add a comment |
I'm have netty application with requests processed by jersey 1.0 resources and writes back the content to netty channel after processing.
I have my code in github here.
The http request to netty is read by channel inbound handler here and it prints the below message to console.
request received
HttpObjectAggregator$AggregatedFullHttpRequest(decodeResult: success, version: HTTP/1.1, content: CompositeByteBuf(ridx: 0, widx: 0, cap: 0, components=0))
GET /hellonetty HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cookie: _ga=GA1.1.1996916298.1541452253; _gid=GA1.1.1674341523.1543246307
spf-debug: 3
spf-referrer: https://www.superchevy.com/features/1809-test-lab-61-did-gm-let-1963-corvette-slip-away/
spf-ip: 38.97.88.235
content-length: 0
Also, I'm writing the response back to the channel here.
This is written to console immediately as well.
in response writer respone DefaultFullHttpResponse(decodeResult: success, version: HTTP/1.1, content: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 11, cap: 64))
HTTP/1.1 200 OK
Content-Type: text/plain
But the response is not display in browser and browser still displays in program.
When I stopped the netty-jersey1 java program the response is displayed in the chrome browser immediately.
Any idea why I'm facing this weird behavior.
What is wrong with my coding?
java java-8 netty jersey-1.0
I'm have netty application with requests processed by jersey 1.0 resources and writes back the content to netty channel after processing.
I have my code in github here.
The http request to netty is read by channel inbound handler here and it prints the below message to console.
request received
HttpObjectAggregator$AggregatedFullHttpRequest(decodeResult: success, version: HTTP/1.1, content: CompositeByteBuf(ridx: 0, widx: 0, cap: 0, components=0))
GET /hellonetty HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cookie: _ga=GA1.1.1996916298.1541452253; _gid=GA1.1.1674341523.1543246307
spf-debug: 3
spf-referrer: https://www.superchevy.com/features/1809-test-lab-61-did-gm-let-1963-corvette-slip-away/
spf-ip: 38.97.88.235
content-length: 0
Also, I'm writing the response back to the channel here.
This is written to console immediately as well.
in response writer respone DefaultFullHttpResponse(decodeResult: success, version: HTTP/1.1, content: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 11, cap: 64))
HTTP/1.1 200 OK
Content-Type: text/plain
But the response is not display in browser and browser still displays in program.
When I stopped the netty-jersey1 java program the response is displayed in the chrome browser immediately.
Any idea why I'm facing this weird behavior.
What is wrong with my coding?
java java-8 netty jersey-1.0
java java-8 netty jersey-1.0
edited Nov 29 '18 at 19:03
Rajkumar Natarajan
asked Nov 28 '18 at 20:03
Rajkumar NatarajanRajkumar Natarajan
1,72211742
1,72211742
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53527267%2fnetty-application-with-jersey-1-0-is-not-returning-response-immediately%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53527267%2fnetty-application-with-jersey-1-0-is-not-returning-response-immediately%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown