// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-// Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
+// Copyright (c) 2006 Alexander Olk
//
// Authors:
//
-// Alexander Olk xenomorph2@onlinehome.de
+// Alexander Olk alex.olk@googlemail.com
//
using System;
private int bytes_read = 0;
+ private bool mime_available = false;
+
public static NameValueCollection Aliases;
public static NameValueCollection SubClasses;
if (buffer_length != -1) {
buffer = new byte[ buffer_length ];
+ mime_available = true;
+ }
+ }
+
+ public static bool MimeAvailable
+ {
+ get {
+ return Instance.mime_available;
}
}
if ( key[0] == '*' )
{
- if (FastEndsWidth(filename, key.Replace( "*", "" )))
+ if (FastEndsWidth(filename, key.Replace( "*", String.Empty )))
{
global_result = GlobalSufPref[ i ];
CheckGlobalResult( );
}
else
{
- if ( FastStartsWith(filename, key.Replace( "*", "" ) ) )
+ if ( FastStartsWith(filename, key.Replace( "*", String.Empty ) ) )
{
global_result = GlobalSufPref[ i ];
CheckGlobalResult( );
{
index += 13; // Length of string "Content-type:"
- global_result = "";
+ global_result = String.Empty;
while ( search_string[ index ] != ';' )
{
// indent
char c;
if (br.PeekChar () != '>') {
- string indent_string = "";
+ string indent_string = String.Empty;
while (true) {
if (br.PeekChar () == '>')
break;
private int ReadValue ()
{
- string result_string = "";
+ string result_string = String.Empty;
int result = 0;
char c;
private string ReadPriorityAndMimeType (ref int priority)
{
if (br.ReadChar () == '[') {
- string priority_string = "";
+ string priority_string = String.Empty;
while (true) {
char c = br.ReadChar ();
if (c == ':')
priority = System.Convert.ToInt32 (priority_string);
- string mime_type_result = "";
+ string mime_type_result = String.Empty;
while (true) {
char c = br.ReadChar ();
if (c == ']')