[kforge-user] KForge v0.17 released

Gunnar Läthén gunnar.lathen at itn.liu.se
Mon Nov 9 08:38:59 UTC 2009


6 nov 2009 kl. 21.01 skrev John Bywater:

>> I modified the source somewhere to hardcode https URLs (instead of  
>> http)
>> for the service listings.  No matter how I try I can't recreate  
>> this in
>> 0.17, my first guess was url.py, but that didn't lead to any changes.
>> Any hints?
> First thing to say is: KForge now tries not to care where it is being
> served. That's why the url.py doesn't work in the same way as before.
> But I must admit that we need to finish off this aspect, and there are
> unfortunately places where KForge assumes HTTP.
> At line 116 of kforge/django/apps/kui/views/service.py we have:
> protocol = "http"
> You could change this to:
> protocol = "https"
> and see if that works for you?

Thanks, that worked perfectly.

> You may also need to change line 91 of kforge/plugin/mailman.py.
> But we need to finish this aspect. Can you help me decide the
> requirements? The protocol could be detected from the request. Or we
> could set it in config. I'm not exactly sure what to do for the best.
> Should it be one or the other, or possibly both?
> I'm inclined towards pulling it from the request (by using the
> HttpRequest.is_secure() method, right?) but sometimes the urls are
> generated without any request (in the mailman plugin above).
> So perhaps we should use the request where possible, then fall back to
> the system dictionary default, which can be overridden by setting the
> value in the config file? Or should it always pull from the config  
> file,
> so it's consistent and explicit? I just discussed this with Rufus,  
> and I
> still can't decide.
> How would you like it to be? If you tell me what you'd like, I'll  
> try to
> do it just like that. ;-)

Hmm, tricky.. I think the best way would be to pull it from the  
request as you say. We currently have an apache redirect when users  
try to access the main page at http://kforge so they end up at https://kforge 
  instead. So the preferred protocol could be tweaked in the apache  
config and thereby be left out of kforge.  I feel this is the most  
natural.  We don't use mailman, so I don't exactly know how that  
works.  If you really need to set a protocol in the kforge config I  
think that value should always be used to avoid confusion, but my  
preference would be to leave it out of the kforge config entirely.

Maybe that gives some input..!


>> Thanks again for the very nice system,
> Thanks for using KForge!
>> Kind regards,  Gunnar Läthén
> Best wishes,
> John

More information about the kforge-user mailing list