def copyprops(original_fn, decorated_fn):
    """Copy the WSGIWAPI properties from a function to a decorated function.

    If you write your own decorators and apply them to WSGIWAPI decorated
    functions, you should call this method in your decorator to copy the
    WSGIWAPI properties into your decorated function.  If you don't do this,
    you may get confusing failures, such as pathinfo not being allowed.

    """
    if hasattr(original_fn, '_wsgiwapi_props'):
        decorated_fn._wsgiwapi_props = original_fn._wsgiwapi_props
    if hasattr(original_fn, '__doc__'):
        decorated_fn.__doc__ = original_fn.__doc__
