aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2009-02-21 11:48:50 +0000
committerMelanie Thielker2009-02-21 11:48:50 +0000
commitaaf8b07ecfaf1ea054736a1f86e37771bcfa8813 (patch)
treea858eab263bd30208b49d74f0c09328bc7bbf37a
parent* Applied a patch that: Added estate ban table to migration scripts and nhibe... (diff)
downloadopensim-SC_OLD-aaf8b07ecfaf1ea054736a1f86e37771bcfa8813.zip
opensim-SC_OLD-aaf8b07ecfaf1ea054736a1f86e37771bcfa8813.tar.gz
opensim-SC_OLD-aaf8b07ecfaf1ea054736a1f86e37771bcfa8813.tar.bz2
opensim-SC_OLD-aaf8b07ecfaf1ea054736a1f86e37771bcfa8813.tar.xz
Allow entry of '?' in http URIs. If the field being typed begins with
"http", the ? is just an ordinary character in that field.
-rw-r--r--OpenSim/Framework/Console/ConsoleBase.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs
index bd19800..1f88062 100644
--- a/OpenSim/Framework/Console/ConsoleBase.cs
+++ b/OpenSim/Framework/Console/ConsoleBase.cs
@@ -799,16 +799,25 @@ namespace OpenSim.Framework.Console
799 } 799 }
800 } 800 }
801 801
802 private void ContextHelp() 802 private bool ContextHelp()
803 { 803 {
804 string[] words = Parser.Parse(cmdline.ToString()); 804 string[] words = Parser.Parse(cmdline.ToString());
805 805
806 string[] opts = Commands.FindNextOption(words, cmdline.ToString().EndsWith(" ")); 806 bool trailingSpace = cmdline.ToString().EndsWith(" ");
807
808 // Allow ? through while typing a URI
809 //
810 if (words.Length > 0 && words[words.Length-1].StartsWith("http") && !trailingSpace)
811 return false;
812
813 string[] opts = Commands.FindNextOption(words, trailingSpace);
807 814
808 if (opts[0].StartsWith("Command help:")) 815 if (opts[0].StartsWith("Command help:"))
809 Output(opts[0]); 816 Output(opts[0]);
810 else 817 else
811 Output(String.Format("Options: {0}", String.Join(" ", opts))); 818 Output(String.Format("Options: {0}", String.Join(" ", opts)));
819
820 return true;
812 } 821 }
813 822
814 public void Prompt() 823 public void Prompt()
@@ -923,8 +932,8 @@ namespace OpenSim.Framework.Console
923 932
924 if (c == '?' && isCommand) 933 if (c == '?' && isCommand)
925 { 934 {
926 ContextHelp(); 935 if (ContextHelp())
927 continue; 936 continue;
928 } 937 }
929 938
930 cmdline.Insert(cp, c); 939 cmdline.Insert(cp, c);