Fixed a critical bug in redirects handling

main
Inga 🏳‍🌈 14 years ago
parent b06cc3eb09
commit 505a3bf657
  1. 4
      IISMainHandler/handlers/AbstractGetHandler.cs
  2. 4
      IISMainHandler/handlers/request/AbstractPostHandler.cs

@ -36,6 +36,10 @@ namespace FLocal.IISHandler.handlers {
public void Handle(WebContext context) {
try {
context.httpresponse.Write(context.Transform(this.templateName, this.getData(context)));
} catch(RedirectException) {
throw;
} catch(WrongUrlException) {
throw;
} catch(Exception e) {
context.LogError(e);
context.httpresponse.Write(context.Transform("Exception.xslt", new XDocument(new XElement("root", this.getCommonData(context), e.ToXml()))));

@ -56,6 +56,10 @@ namespace FLocal.IISHandler.handlers.request {
if(this.shouldBeGuest && context.session != null) throw new FLocalException("Should be guest");
if(this.shouldBeLoggedIn && context.session == null) throw new FLocalException("Should be anonymous");
context.httpresponse.Write(context.Transform(this.templateName, this.getData(context)));
} catch(RedirectException) {
throw;
} catch(WrongUrlException) {
throw;
} catch(Exception e) {
context.LogError(e);
context.httpresponse.Write(context.Transform("Exception.xslt", new XDocument(new XElement("root", this.getCommonData(context), e.ToXml()))));

Loading…
Cancel
Save