User Tag List

Results 1 to 10 of 10

Thread: Moosok and HTTP/1.1 400 Bad Request

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export ModuleInstall Creator ProPatch Maker

    Join Date
    Jul 2006
    Location
    Athens, GA
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Moosok and HTTP/1.1 400 Bad Request

    Hi,

    I am trying to send a line of text from a form using moosok to a database and it works as long as the text line is under a certain length. How can I send a longer line of text or essay without getting an HTTP/1.1 400 Bad Request?

    Also later I would like to recreate an essay writing program in MMF2 that was originally designed in flash but cannot seem submit a large text of data using moosok?

    Thanks for any help or suggestion.

  2. #2
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: Moosok and HTTP/1.1 400 Bad Request

    What is the text line your sending?

    Have you discovered what the length is that causes the problem?
    I.E. 200 characters work but 201 do not

    Without knowing a bit more about what your doing it would be hard to figure out what the problem is.

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export ModuleInstall Creator ProPatch Maker

    Join Date
    Jul 2006
    Location
    Athens, GA
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moosok and HTTP/1.1 400 Bad Request

    Here is a sample of a line that gets submitted with no error:

    "|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0| ||0|||0|||0|||0|||0|||0|||0|||0|||0|||0||||||Wedne sday,June20,2007|||23:38:06"

    But as I enter more fields with a space I get the error. This goes through but will not if a space is entered anywhere:

    |||Seoul|||Korea|||email@email.com|||123-4567|||jobtitle|||articlenews|||0|||0|||0|||0|||0| ||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0||||||W ednesday,June20,2007|||23:38:06

    Does this mean that all the spaces should be replaced with a character then reinserted later?

    Thanks.

  4. #4
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moosok and HTTP/1.1 400 Bad Request

    If you replace the spaces with their URL-encoded equivalent, %20, then you'll be able to pass them on to the database without problems - there's a "URL encode" action on the String Parser object that can do this.

  5. #5
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: Moosok and HTTP/1.1 400 Bad Request

    Yes and some of the other characters can cause problems with the PHP script. So you do want to be sure to use the URL encode function David mentioned.

    A good test to see if it is OK is -- copy and paste it into a web browser itself -- If that fails then it will also fail thru moosock.

  6. #6
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moosok and HTTP/1.1 400 Bad Request

    Stupid question, but if you are using POST then you are sending the correct content-length?

  7. #7
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export ModuleInstall Creator ProPatch Maker

    Join Date
    Jul 2006
    Location
    Athens, GA
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moosok and HTTP/1.1 400 Bad Request

    Thanks for all the input.

    It seems like a lot of extra work to strip out all the spaces and other characters that may cause errors then later replace them for readability? Is their an another approach? How about POST?

    I created a flash essay writing program that could just send a student's outline and essay using php to a database as written. I would love to write this in MMF2 and expand the writing program to have spell check etc.

  8. #8
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: Moosok and HTTP/1.1 400 Bad Request

    The function in String Parser will encode the entire string for you

    Set the string parser text to your text
    Then just urlEncode$( "String Parser" )

    and all the special characters and spaces will be converted

  9. #9
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export ModuleInstall Creator ProPatch Maker

    Join Date
    Jul 2006
    Location
    Athens, GA
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moosok and HTTP/1.1 400 Bad Request

    Great news- I'll give it a try.

    Thanks

  10. #10
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Moosok and HTTP/1.1 400 Bad Request

    If you are using GET then that could be why you're having trouble, most servers have a problem if the GET request is too long.

    Here's a sample POST request:
    Code:
    POST /abc.php HTTP/1.1
    Host: example.com
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 25
    
    data=abc%20123&user=admin
    The request body (after the blank line) is identical to what you'd send after the ? in a GET request, and still should be url-encoded.

Similar Threads

  1. Basic HTTP request / handling?
    By Hojimbo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 18th November 2009, 11:43 PM
  2. moosok and cpu
    By crugh in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 16th July 2007, 08:13 AM
  3. [Request]Nobu HTTP
    By Plooscva in forum Extension Development
    Replies: 4
    Last Post: 21st December 2006, 08:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •