-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why didn't fire the "onContentWriteProgress" event ? #233
Comments
From
Are you sure the document you're uploading is big enough so that it had to be chunked? |
yes, I noticed that, the upload file I used for testing (dj2.exe) is about 11.9 MB. |
Do you think you could expose your server so we can reproduce and investigate? |
Thanks for your feedback. I used PHP script to test this issue and the source of the script (upload.php) has attached in my first post. http://labs.solosky.net/upload.php If this link broken or not work, please post here and I will fix it as soon as possible. |
sorry, I clicked "Close & Comment" Button... Reopened it. FML. |
So much to do, so little time, that's why I asked you if you could provide the whole set up. |
My pleasure, I love PHP!!!! |
The problem seems to happen here: https://github.com/AsyncHttpClient/async-http-client/blob/ahc-1.7.x/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java#L556 Here's the sequence:
I don't understand how DefaultChannelFuture.setSuccess is being almost immediately called while the uploaded file is about 10Mo. |
Thanks slandelle. So was it a issue cause by Netty library, shall we ask help from Netty groups? PS: It's midnight and I realy should go to sleep. I'm in china. ^_^ |
I don't know if it's a Netty bug, or an AHC one, but I indeed asked @normanmaurer. See you soon. |
You could, as a workaround, try using the Grizzly provider. |
IIRC, the bug was in Netty and I did try to implement myself some kind of notification. I'm pretty sure actually this isn't working in Netty. |
@solosky I finally has a serious look at this issue, and I have some good news, but also some bad news:
So basically:
|
I don't think that we should disable zero-copy,but notice the user in the java doc. |
A few months ago, I opened a feature request #380 for disabling zero-copy. This way, we wouldn't automatically disable zero-copy, but people willing to have the feature will still have a way. |
@solosky I'm trying to get this fixed. Don't be surprised if you see some traffic on your app at http://labs.solosky.net/upload.php |
Netty issue: netty/netty#2151 |
Feel free to reopen if the issue still happens with AHC 2 (current master / latest alpha). |
I make it shortly.
I used AsyncHttpClient to upload a file to server, and want show the upload progress to UI,
so I worked with ProgressAsyncHandler, But it did not call "onContentWriteProgress" method. Did I do something wrong ? please help me out.
UploadFileTest .java
upload.php
This php script simply reading first uploaded file and writing it back to response.
If did not have php server, XAMPP is suggested.
http://www.apachefriends.org/zh_cn/index.html
Thanks.
solosky
The text was updated successfully, but these errors were encountered: