Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

HTTP maximum request size and method problems

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-25-2007, 04:02 AM
willisgt's Avatar
Senior Member
 
Join Date: Aug 2007
Location: Nacogdoches, Texas USA
Posts: 162
Question HTTP maximum request size and method problems

I am trying to find a way to move database records back and forth between a mySQL database and the mobile device. Right now, I'm trying to do this by means of a series of HTTP requests.

To download, I do something simple like tell the php script on the server side which record I want. The server can answer with as long a string as it likes, and the device handles it just fine.

To upload, I have to send the field names and values as part of the request. Problem is, HTTP has a limit on just how much data can be sent as part of an HTTP request. On my device, it seems to be about 2K. If I exceed that limit, the device chokes. (Running the app on the desktop produces no errors or problems regardless of the size of the request.)

I've tried every http method in the lib. All of them (except POST) seem to be interpreted by my Apache server as if I'd sent a GET request. If I remember correctly, the POST was interpreted by the server as a POST, but I couldn't read the data (fields and values). It just wasn't there.

So I need to find a way to send *very long* strings to the server within the HTTP request. I can't break the string down any further; in my application, some database fields contain several kilobytes of text.

Alternatively, does anyone know a better way to transfer data between an SQLite database (on the device) and a mySQL database (on the server)?

Best Regards,

Gary

Reply With Quote
  #2 (permalink)  
Old 08-27-2007, 07:10 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

As the Get method sends the data inside the URL it has a size limit.
You should use Post or Put methods instead.
There is an example of uploading a file using Put here:
http://www.basic4ppc.com/help/http/index.html
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scrollbar.LargeChange and Maximum BjornF Questions (Windows Mobile) 5 09-29-2008 07:06 PM
request for squeeling counter demo! colin9876 Questions (Windows Mobile) 25 05-21-2008 10:25 PM
Rnd() ignores the maximum value Mistrel Questions (Windows Mobile) 6 10-15-2007 03:15 PM
screen size to form size relation Cableguy Basic4ppc Wishlist 2 08-14-2007 09:40 PM
ArrayList Dispose Method RandomCoder Bug Reports 2 07-02-2007 12:57 PM


All times are GMT. The time now is 11:04 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0