Module webmachine_util

Utilities for parsing, quoting, and negotiation.

Copyright © 2007-2008 Basho Technologies (guess_mime/1 derived from code copyright 2007 Mochi Media, Inc.) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Authors: Justin Sheehy (justin@basho.com), Andy Gross (andy@basho.com).

Description

Utilities for parsing, quoting, and negotiation.

Data Types

now()

now() = {MegaSecs, Secs, MicroSecs}

Function Index

choose_charset/2
choose_encoding/2
choose_media_type/2
compare_ims_dates/2
convert_request_date/1
guess_mime/1 Guess the mime type of a file by the extension of its filename.
media_type_to_detail/1
now_diff_milliseconds/2 Compute the difference between two now() tuples, in milliseconds.
quoted_string/1
split_quoted_strings/1

Function Details

choose_charset/2

choose_charset(CSets, AccCharHdr) -> any()

choose_encoding/2

choose_encoding(Encs, AccEncHdr) -> any()

choose_media_type/2

choose_media_type(Provided, AcceptHead) -> any()

compare_ims_dates/2

compare_ims_dates(D1, D2) -> any()

convert_request_date/1

convert_request_date(Date) -> any()

guess_mime/1

guess_mime(File::string()) -> string()

Guess the mime type of a file by the extension of its filename.

media_type_to_detail/1

media_type_to_detail(MType) -> any()

now_diff_milliseconds/2

now_diff_milliseconds(X1::now(), X2::now()) -> integer()

Compute the difference between two now() tuples, in milliseconds.

quoted_string/1

quoted_string(Rest) -> any()

split_quoted_strings/1

split_quoted_strings(Str) -> any()


Generated by EDoc, Feb 8 2011, 19:14:54.