Conneg fails on controler when called by jQuery getJSON() ?

5 views
Skip to first unread message

astilla

unread,
Dec 2, 2010, 5:50:46 AM12/2/10
to Konstrukt
Hi,

Just seen something that looks like a bug in Konstrukt:-

I have a controller that responds via renderHtml() and renderJson().

* Html view works perfectly via conneg.
* When using Curl to just pass an accept header of application/json
the Json response works perfectly via conneg too.
* When using jQuery $.getJSON(...) the Konstruct controller always
returns the Html view. By using Firebug I can see that jQuery is
passing an accept header of "application/json, text/javascript, */*".
It looks like Konstrukt is having problems with jQuery passing all 3
with no preference (q=) and falling back to */* and returning the Html
response.

Anyone else seen this and can verify how Konstrukt should be dealing
with this?

Andrew

troels knak-nielsen

unread,
Dec 2, 2010, 8:09:27 AM12/2/10
to kons...@googlegroups.com
Thanks for reporting.

I can confirm the error you are seing. I have created a test for it here:

https://github.com/troelskn/konstrukt/commit/2e761e03562116a810a3e7713ec93d26019a6eb0

Should probably be easy enough to fix.

Can I ask you to create an issue in the issue tracker, to keep track
of this problem?

https://github.com/troelskn/konstrukt/issues

--
troels

> --
> You received this message because you are subscribed to the Google Groups "Konstrukt" group.
> To post to this group, send email to kons...@googlegroups.com.
> To unsubscribe from this group, send email to konstrukt+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/konstrukt?hl=en.
>
>

astilla

unread,
Jan 14, 2011, 5:35:30 AM1/14/11
to Konstrukt
On Dec 2 2010, 1:09 pm, troels knak-nielsen <troel...@gmail.com>
wrote:
> Thanks for reporting.
>
> I can confirm the error you are seing. I have created a test for it here:
>
>    https://github.com/troelskn/konstrukt/commit/2e761e03562116a810a3e771...
>
> Should probably be easy enough to fix.
>
> Can I ask you to create an issue in the issue tracker, to keep track
> of this problem?
>
>    https://github.com/troelskn/konstrukt/issues
>

Sorry for delay - just created the issue as I'd realised I had
forgotton to raise it.

How often does Konstrukt get updated out of curiousity? Seems a very
low-usage framework with few people subscribed to the discussion
group.

troels knak-nielsen

unread,
Jan 14, 2011, 6:01:04 AM1/14/11
to kons...@googlegroups.com
On Fri, Jan 14, 2011 at 11:35 AM, astilla <ajb...@gmail.com> wrote:
> How often does Konstrukt get updated out of curiousity?  Seems a very
> low-usage framework with few people subscribed to the discussion
> group.

You mean how often does a new release get rolled out? Iuse the head
version, so I forget to roll tagged releases. I reckon most users do
the same.

--
troels

Heitzso

unread,
Jan 14, 2011, 8:03:29 AM1/14/11
to kons...@googlegroups.com
Speaking up as someone who has used konstrukt ...
it is a delightful, no nonsense, cleanly designed framework.
When I researched frameworks, it offered the speed
I needed. Specifically it gets out of the way and doesn't
over engineer everything. I hope others discover its
usefulness.

Thanks.

Reply all
Reply to author
Forward
0 new messages