413 Request Entity Too Large - he requested resource<br />/dispatch.php<br /> does not allow request data with POST requests, or the amount of data provided in.

234 views
Skip to first unread message

ramon

unread,
May 8, 2013, 7:56:51 PM5/8/13
to tumbl...@googlegroups.com
Hi guyz,

I recently bumped into a problem with Jumblr & Android 2.3 ...


When I post text to Tumblr the following Exception is thrown:


E/AndroidRuntime(18369): com.tumblr.jumblr.exceptions.JumblrException: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

E/AndroidRuntime(18369): <html><head>

E/AndroidRuntime(18369): <title>413 Request Entity Too Large</title>

E/AndroidRuntime(18369): </head><body>

E/AndroidRuntime(18369): <h1>Request Entity Too Large</h1>

E/AndroidRuntime(18369): The requested resource<br />/dispatch.php<br />

E/AndroidRuntime(18369): does not allow request data with POST requests, or the amount of data provided in

E/AndroidRuntime(18369): the request exceeds the capacity limit.

E/AndroidRuntime(18369): </body></html>

E/AndroidRuntime(18369): 

E/AndroidRuntime(18369): at com.tumblr.jumblr.request.RequestBuilder.clear(RequestBuilder.java:124)

E/AndroidRuntime(18369): at com.tumblr.jumblr.request.RequestBuilder.postMultipart(RequestBuilder.java:61)

E/AndroidRuntime(18369): at com.tumblr.jumblr.JumblrClient.postCreate(JumblrClient.java:352)

E/AndroidRuntime(18369): at com.tumblr.jumblr.types.Post.save(Post.java:254)

E/AndroidRuntime(18369): at com.tumblr.jumblr.types.SafePost.save(SafePost.java:17)

E/AndroidRuntime(18369): at com.tumblr.jumblr.types.TextPost.save(TextPost.java:1)

E/AndroidRuntime(18369): at com.postly.manager.TumblrManager$4.run(TumblrManager.java:317)

E/AndroidRuntime(18369): at java.lang.Thread.run(Thread.java:1019)


On my Android Devices with Version 4.0 and bigger it works like a charm.


Here is the code for posting:


Thread thread = new Thread(new Runnable() {


@Override

public void run() {


try {

JumblrClient client = new JumblrClient(mContext

.getString(R.string.tumblr_consumer_key), mContext

.getString(R.string.tumblr_consumer_secret),

mAccessToken, mAccessTokenSecret);

String blogName = _chosenBlog;


if (_chosenBlog.length() == 0) {

blogName = client.user().getName();

}


TextPost tp = client.newPost(blogName, TextPost.class);

tp.setBody(_text);


tp.save();


} catch (IllegalAccessException e) {


e.printStackTrace();

Log.d("XX", "Exception: " + e.getMessage());

} catch (InstantiationException e) {

e.printStackTrace();

Log.d("XX", "Exception: " + e.getMessage());

}

}

});

thread.start();


Does Jumblr work for you on Android devices with version 2.3?

The Emulator throws the same exception.


I'm thankful for any hint. :)


Ramon

ramon

unread,
May 10, 2013, 10:34:58 PM5/10/13
to tumbl...@googlegroups.com
No one? ><

John Crepezzi

unread,
May 11, 2013, 11:26:59 AM5/11/13
to tumbl...@googlegroups.com
Sorry for the delayed response 
I've not personally tested Jumblr on Android v2.3

How large is the body you are setting?


--
You received this message because you are subscribed to the Google Groups "Tumblr API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tumblr-api+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

ramon

unread,
May 11, 2013, 11:34:51 AM5/11/13
to tumbl...@googlegroups.com
Hi,
thanks for your repsonse! :)

For testing purposes I just send some characters or words ending up with a content length of 275 - 350 (bytes?).

When I use the same code and same text it works like a charm. In usual Java (1.6) I didnt' encounter any problems, too.

Thank you!

Ramon 

ramon

unread,
May 11, 2013, 11:35:56 AM5/11/13
to tumbl...@googlegroups.com
EDIT:

When I use the same code and same text in Android 4.X.X it works like a charm. In usual Java (1.6) I didnt' encounter any problems, too.

John Crepezzi

unread,
May 13, 2013, 10:45:49 AM5/13/13
to tumbl...@googlegroups.com
Hmm - I can't think of anything offhand that would cause this, possibly something deeper in Scribe
I can take a look around and see if I come up with anything

John Crepezzi

unread,
May 13, 2013, 11:00:42 AM5/13/13
to tumbl...@googlegroups.com
Hey Ramon,
Can you verify that the size of the payload is the same where you're having issues?

ramon

unread,
May 13, 2013, 7:14:50 PM5/13/13
to tumbl...@googlegroups.com
Hi John, thanks again for your response. :)

Can you verify that the size of the payload is the same where you're having issues

What exactly do you mean with that? For example I tried to send the text "test" with Jumblr on Android 2.3, 4.0.X and in Desktop Java (6).

The content-length was about 275-350 on all devices but I encountered the 413 only on Android 2.3.


I also think that it has something to do with Scribe ...
Would it help if I send you the header values which come with my request?

Thanks again for your help. I hate to give up and want to try to solve this! ^^

Ramon
Reply all
Reply to author
Forward
0 new messages