• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: weird combination! (followup: Form field ignored?!? Weird...)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird combination! (followup: Form field ignored?!? Weird...)


  • Subject: Re: weird combination! (followup: Form field ignored?!? Weird...)
  • From: Hugi Thordarson <email@hidden>
  • Date: Thu, 25 Sep 2008 18:49:08 +0000

Hmmm, I hit something very similar, although under a different configuration. First of all, I'm using WO 5.4, and everything worked fine for me with a plain WO 5.4 project. But if I WOnderized the app, this behaviour would rear its head...

See:
http://issues.objectstyle.org/jira/browse/WONDER-144

I haven't had time to look into the issue, my temporary solution was to store session IDs in URLs.

Cheers,
- Hugi



On 25.9.2008, at 15:24, Ondřej Čada wrote:

Looks like I did find the culprit... kind of, but don't understand it at all, to be frank :(

It seems that if the two following conditions are combined, "multipart/form-data" forms send nulls only:

(a) storing session IDs into cookies, by

public class Session extends WOSession {
   public Session() {
       super();
	setStoresIDsInCookies(true);
	setStoresIDsInURLs(false);
   }
}

(b) using UTF-8 as the page encoding, by

public class Application extends WOApplication {
...
// ensure UTF-8 is actually used anywhere
static public void updateResponseForUTF8(WOResponse rr) {
rr.setContentEncoding(_NSUtilities.UTF8StringEncoding);
rr.setHeader("text/html; charset=UTF-8; encoding=UTF-8", "content-type");
}
public void appendToResponse(WOResponse rr, WOContext cc) {
updateResponseForUTF8(rr);
super.appendToResponse(rr,cc);
}
public void takeValuesFromRequest(WORequest rr, WOContext cc) { //!!!
rr.setDefaultFormValueEncoding(_NSUtilities.UTF8StringEncoding);
super.takeValuesFromRequest(rr,cc);
}
}


Actually the //!!! method is sufficient to render a multipart/form- data" form not to work properly -- along with the IDs in cookies; the appendToResponse method does not need to be overridden for the problem to occur.

I would be grateful for an insight whether this is my bug or a WO bug (should I perhaps ensure UTF-8 compliance otherwise?), and I would be _very_ grateful for any advice how to solve the problem, given the client insists on both session IDs in cookies and UTF8 pages...

If anyone cares to check, I am attaching the simple test project -- hope it will make it through the list software:

<WTF.zip>

Thanks,
OC _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Form field ignored?!? Weird... (From: Ondřej Čada <email@hidden>)
 >Re: Form field ignored?!? Weird... (From: Ondřej Čada <email@hidden>)
 >weird combination! (followup: Form field ignored?!? Weird...) (From: Ondřej Čada <email@hidden>)

  • Prev by Date: Re: BigDecimal for SELECT SUM(...)
  • Next by Date: Re: Cloning objects in WO?
  • Previous by thread: Re: weird combination! (followup: Form field ignored?!? Weird...)
  • Next by thread: ERD2WQueryPage
  • Index(es):
    • Date
    • Thread